{"version":3,"sources":["scripts/app.js"],"names":["angular","module","PopupMessageController","$uibModalInstance","close","vm","this","$inject","controller","ClientCancelledMessageController","CommonService","ClientPortalService","$rootScope","notification","active","Date","contactedDate","isOver24","feeCancel","isLessThan24","isLessThan12","getBooking","bookingId","then","data","timeCancell","result","checkDate","startDate","endDate","ClientCancelledPopupBeforePaymentMessageController","CandidateCancelledMessageController","AmendRefusedPopupMessageController","SignUpStaffRequirementsController","$state","$localStorage","SignupClientService","CONFIG","dataList","activate","getTypeOfWork","getEmploymentStatuses","getKeySkills","getWorkExperiences","employmentStatuses","items","getWorkTypes","typeOfWorks","keySkills","getKeyExperiences","workExperiences","updateClient","loading","userClient","id","userProfile","companyProfile","go","routes","client","signup","candidates","error","emailMessage","exceptionMessage","copy","SignUpHomeController","getVoucher","voucher","console","log","findMeStaff","jobSearchHomeForm","$valid","searchFilter","timePickerDefault","date","moment","toDate","dateTimeFilters","set","startTime","endTime","SignUpFinishController","$uibModal","ngToast","accessPortal","isEmailConfirmed","portal","welcomeBack","sendClientConfirmEmailViaPhoneNumber","open","templateUrl","$scope","login","size","receivedEmail","sendClientConfirmEmail","success","content","dismissButton","dismissButtonHtml","noSendEmail","warning","home","hasBooking","params","type","SignUpFindMeStaffController","equals","userFindCandidate","goHome","staffList","merge","pageSize","pageNo","findStaffs","length","candidatesNoItems","bookStaff","clientProfile","SignUpClientConfirmEmailController","$stateParams","Auth","confirmEmail","code","res","confirmSuccess","confirmResponse","redirectLink","logout","isHasLogin","SignUpClientProfileController","UserRoleService","getNatureOfBusiness","getClientRole","getRoleByName","userRoles","clientRole","onCreateOrUpdateClient","clientProfileForm","roleId","isActive","updateClientUserProfile","staffRequirements","createClient","user","userNameOrEmailAddress","emailAddress","password","isSignup","loginWithoutConfirm","getBusinessTypes","natureOfBusiness","isAcceptedGDPR","SignUpCandidateController","finishRegistration","bookCandidateId","book","clientId","candidateIds","additionalCandidateIds","listAdditionalCandidateId","createBookings","finish","errorMessage","onCandidateChanged","cadidates","listCandidate","arr","forEach","candidate","push","getlistAdditionalCandidateId","listselectedCandidate","item","isMainCandidate","check","completeWithoutCreateBooking","ReportIssueMessageModalController","booking","ok","cancel","dismiss","openTermCondition","openTermConditionModal","ReportIssueModalController","otherIssue","ReasonRefuseController","getReasons","reasons","name","isChecked","match","i","sync","bool","splice","ProfileModalController","profile","getProfileUser","getCandidateUserById","isPlay","link","rest","baseURILink","getDateOfWeek","d","formatDate","play","e","videoType","elem","element","currentTarget","parent","find","paused","muted","fadeOut","on","pause","fadeIn","FutureBookingClientController","checkTime","goToAmendBooking","amendBooking","EmploymentStatusController","CancelBookingConfirmController","cancelledBooking","bookingsInformation","feeAdmin","$window","openConfirmCancellationModal","openTermConditionUrl","href","common","termsConditions","acceptCancel","bookingDate","year","month","hour","minute","status","invoice","hadPayment","paidAmount","lbFee","isUnder24","candAmount","isUnder12","BookingHistoryClientController","goToReBooking","invoiceNo","reBooking","reload","HomePageClientController","goFindTheStaff","findTheStaff","goCompanyProfile","goBookingsInformation","goReportIssue","reportIssue","ReportIssueController","getClientRequestBookings","bookings","noReportIssue","goBackHomePage","openReportIssuePopup","openReportIssueModal","reportOtherIssueBooking","openReportIssueMessagePopup","openReportIssueMessageModal","ReBookingController","$filter","getBookingCandidate","checkCompareDate","amountBooking","amount","potentialCandidates","candidateId","candidateUser","err","message","reBookingDate","newDate","goToConfirmedBooking","format","timeFormat","dateFormat","goToHireCandidate","permanentRole","calculatorAmount","$watchGroup","newValues","oldValues","RatingStarClientController","ratingStar","getCandidateRateByClient","ratingStarList","ratingStarListOrigin","submitRatingStar","resultCompare","rateCandidate","PermanentRoleController","openCalendarPopup","calendarPopup","startDateOpened","permanentRoleSubmit","dateOptions","bootstrapDateFormat","permanentRoleForm","MakePaymentController","makePayment","getVATBooking","feeVAT","paidLBFee","voucherId","value","totalAmount","paidBooking","paymentForm","expirationYear","get","accept","stripeCustomer","errorPayment","ClientHowCommunicateController","updateClientUserContact","profileHowCommunicateForm","userClientTemp","communicate","isEmailAddress","isSecondEmailAddress","isTelephoneNumber","isMobileNumber","FindMeStaffController","findStaff","jobSearchPortalForm","contactStaff","JSON","parse","localStorage","getItem","ContactStaffController","contactCandidates","address","workTypeIds","keySkillIds","employmentStatusIds","keyExperienceIds","candidateType","Main","ContactCandidatesController","ConfirmedBookingController","confirmedBooking","goToMakePayment","onRedeemVoucher","redeemVoucherCode","CompanyProfileController","saveData","updateClientUserFull","showNewPolicySticky","requestDeleteAccount","goToHowCommunicate","howCommunicate","updateReceivingEmailStatus","dataReq","receivingEmailStatus","receivingEmail","BookingsInformationController","getClientPreviousBookings","PageNo","pagePreviousNo","PageSize","pagePreviousSize","dataPreviousBookings","previousBookings","totalPreviousBookingsCount","totalCount","noPreviousBookings","loadMorePreviousBookingCount","getClientUpcomingBookings","pageUpcomingNo","pageUpcomingSize","dataUpcomingBookings","upcomingBookings","totalUpcomingBookingsCount","noUpcomingBookings","loadMoreUpComingBookingCount","goToConfirmBooking","openProfilePopup","openProfileModal","loadMorePreviousBookings","concat","loadMoreUpComingBookings","openFutureBookingPopup","openFutureBookingModal","openBookingHistoryPopup","openBookingHistoryModal","bookingStatus","AmendBookingController","originAmendBooking","doerId","amendBookingDate","isSame","amentBooking","openCancelToolTipModal","openCancelBookingConfirmModal","SignUpUploadDeliveryDriverDocumentController","SignupCandidateService","$timeout","Upload","updateProofOfAddress","userCandidate","copyProofOfAddress","upload","url","baseURI","uploadFile","file","response","deliveryDriver","proofOfAddressUrl","updateDeliveryDriver","errorMsg","updateVehicle","copyOfVehicle","vehicleUrl","selectProofOfAddressImage","$files","imgSrc","URL","createObjectURL","isHasProofOfAddressImage","fileProofOfAddressUrl","selectVehicleImage","isHasVehicleImage","fileVehicleUrl","removeProofOfAddressFiles","removeProofOfAddress","removeVehicleFiles","removeVehicle","goUploadDBSCertificatePage","uploadDBSCertificate","SignUpUploadDBSCertificateController","updateDBSCertificate","copyDBSCertificate","dbsCertificateUrl","selectDBSCertificateImage","isHasDBSCertificateImage","fileDBSCertificateUrl","removeDBSCertificateFiles","removeDBSCertificate","userCandidateTemp","insuranceCode","SignUpStep9Controller","CandidatePortalService","goToPortal","sendCandidateConfirmEmailViaPhoneNumber","sendCandidateConfirmEmail","step1","SignUpStep8Controller","onCreateUserBillingInfo","step9","onSupportForSelfEmployed","supportForSelfEmployed","isMemberOfCommunity","isDeliveryDriver","modeOfTransport","back","step7","profileForm8","isSupportedFromCommunity","SignUpStep7Controller","checkOriginalContactUser","originalProfile","updateUserPassport","copyOfPassport","passportUrl","documentFile","split","pop","toLowerCase","documentPhotoFile","updateUserContact","step8","backProfileCandidate","step6","selectImageLast","pdfFileName","photoFile","showImgFile","showPdfFile","isHasLastImage","filePhotoUrl","selectImage","isHasImage","fileUrl","removePassportFiles","removeUserPassport","email2Message","alternativeDocumentation","profileForm7","croppedPassportDataUrl","pdfFileCurrent","SignUpStep6Controller","backUpdateProfile","step5","goUpdatePassort","goProfileInformation","profileInformation","goProfileAvailability","availability","goProfileUpload","uploadPhoto","SignUpStep5Controller","$sce","checkHasPhotoOrVideo","photoUrl","videoUrl","isImage","isHasVideo","isHasPhoto","documentVideoFile","uploadFiles","cropImageApi","resultImage","crop","files","isVideo","dataUrltoBlob","typeFile","checkTypeFile","onUpdateVideoOrPhoto","fileType","url_Thumbnail","selectFile","fileOnlyUpload","getApiFunction","api","filename","ext","updateUserPhoto","updateUserVideo","goNextStep","removeFiles","removeUserPhotoAndVideo","openVideoToolTipModal","index","resolve","backUpdateCandidateProfile","step4","text","trustAsHtml","myButtonLabels","buttonLabels","SignUpStep4Controller","User","backUpdateCandidate","step3","onUpdateCandidate","profileForm4","updateCandidate","$promise","resp","minHourlyRate","considerPermanentRoleOptions","considerPermanentRole","SignUpStep3Controller","getCandidateRole","onCreateOrUpdateCandidate","profileForm3","checkBODOverLimit","candidateRole","updateCandidateUserProfile","removeItem","createCandidate","opened","clearError","backRatingPage","step2","checkBODDate","BODDate","checkBOD","getTime","maxDate","resetCheckBOD","dateOfBirth","undefined","getFullYear","getMonth","getDate","SignUpStep2Controller","getNearClient","filterClient","clientLength","goCreateCandidate","SignUpStep1Controller","availableDayTimes","userDate","dayOfWeek","isoWeekday","isSelected","getDayWeek","selectDayOfWeek","num","day","diff","current","availableTemp","arrayObjectIndexOf","myArray","searchTerm","len","onChangeTimeTo","available","onChangeTimeFrom","findWorkYouWant","profileForm1","setItem","stringify","timePickerOptions","SignUpModeOfTransportController","getTransportationModes","transportationModes","uploadDeliveryDriverDocument","SignUpInsuranceCodeController","updateInsuranceCode","copyInsuranceCode","selectInsuranceCodeImage","isHasInsuranceCodeImage","fileInsuranceCodeUrl","removeInsuranceCodeFiles","removeInsuranceCode","goStep9","DocumentController","checkOriginalLink","documentUrl","fileDocumentUrl","originalLink","noDocumentation","noDocument","goUploadDocument","goAlternativeDocument","removeDocumentFiles","removeUserDocument","updateUserDocument","SignUpCandidateConfirmEmailController","SignUpCommunityInformationController","communityOrOtherUnionInfo","communityConfirmation","SignUpCommunityConfirmationController","isUnderstandCommunityRules","communityInformation","UnsuitableForCareCandidatelController","backToPortal","otherRefusedReason","refusedReasonIds","getListReasons","FutureBookingCandidatelController","confirmCancel","openConfirmCancelModal","ConfirmCancelController","CareQualificationsUploadCandidatelController","BookingHistoryCandidatelController","BookingDetailController","YunoQuizCandidateController","careCandidatesFactory","startYunoQuiz","suitableForCare","careCandidate","getCurrent","WorkfaceProfileController","goPaymentDetails","paymentDetails","uploadDocuments","goToDeliveryDriver","goToEmploymentRecord","employmentRecord","EmploymentRecords","Identifier","WheelBookingController","backHomePage","showTextMainCan","showTextAddCan","bookingRequests","HomePageCandidateController","goWorkfaceProfile","workfaceProfile","goCurrentStarRating","currentStarRating","goBookingsHistory","bookingsHistory","goCommunityTuPage","goEmploymentSupport","employmentSupport","goCarePathway","UploadPhotoController","documentImgFile","UploadPassportDocumentController","selectPhotoImageLast","photoFilePassport","showImgFilePassport","showPdfFilePassport","isHasLastPhotoImage","selectDocumentImageLast","photoFileDocument","showImgFileDocument","showPdfFileDocument","isHasLastDocumentImage","backToProfile","onUpdateAlternavtiveDoc","pdfFileCurrentPassport","pdfFileCurrentDocument","UploadDeliveryDriverDocumentController","UploadDBSCertificateController","SuitableForCareCandidateController","notForMe","whatsTheProcess","becomeEligible","becomeEligibleForCare","labourXchangeWebsite","LabourXchange","Website","Site","RatingStarCandidateController","getClientRateByCandidate","rateClient","ProfileInformationController","getValuesMostSearchByClient","valuesMostSearch","updateCandidates","profileForm","updateCandidateUserFull","PaymentDetailsController","onBackToProfile","onEarningToDate","createUserBillingInfo","paymentDetailForm","ModeOfTransportController","InsuranceCodeController","goAlreadyToGoAndEarnExtra","alreadyToGoAndEarnExtra","CandidateHowCommunicateController","updateCandidateUserContact","HelpUsToHelpYouCandidateController","GoodEmployer","BanksImproveMost","MostImportantQualities","WorseOrderingTakeaway","MostImportantQualitiesWork","BestEmployee","FriendsFamilyDescribeYou","ChooseFilmPreferance","WorstPartNewJob","OftenBored","WorstPartCookDinner","MachinesBetterHumans","personalInteractionScore","repetitiveTasksScore","saveCareCandidate","allQuestionsCompleted","proceedToCarePathway","checkAccessToCarePathway","findOutMore","backToHomepage","enums","Enums","Id","EmploymentSupportController","getListNewsPage","goEmploymentSupportNews","employmentSupportNews","calculateCommunityMembershipExpiry","communityMembershipExpiry","today","communityMembershipExpiryDate","expiresIn","duration","asDays","communityMembershipExpires","parseInt","getListPagesByPageType","filter","landingPages","listLandingResponse","contentColumns","pageType","newsPage","contentPageRows","typeName","pageTypes","routeConfig","EmploymentSupportNewsController","clickDisplayTitleNews","title","displayTitleNews","totalLanding","loadMoreLanding","loadMoreLandings","EmploymentRecordDocumentController","employmentRecordsFactory","documentsFactory","signaturePadFactory","uploadDBSCheckDocument","uploadDocument","document","DBSCheckDocument","saveEmploymentRecord","uploadedSignedContract","SignedContractDocument","clearSignature","initialise","clear","DigitalSignature","getEmploymentRecord","CurrentStarRatingController","getCurrentRating","getCandidateCurrentRating","currentRating","CancelBookingController","getBookingCancel","cancelBooking","cancelBookingByCandidate","BookingsHistoryController","getListBookings","loadMoreEarningsBookings","loadMoreEarningsBookingCount","pageEarningsNo","getCandidatePreviousBookings","pageEarningsSize","dataEarningsBookings","earningsHistories","totalEarningsBookingsCount","getCandidateUpcomingBookings","comingBookings","earningsTotalAmount","noEarningsHistory","noUpcomingHistory","cancelOneBooking","openBookingDetail","BookingRequestController","acceptBooking","acceptRequestBooking","wheelBooking","getListRequestBookings","listBookings","checkAmendBooking","can","isAmend","hasAmend","titleRequestBooking","noListBookings","refuseBooking","openReasonModal","removeByAttr","refuseRequestBookingWithReason","attr","hasOwnProperty","arguments","BecomeEligibleForCareCandidateController","step","changeButtonLabels","next","backButtonLabel","nextButtonLabel","openUnsuitableForCarePopup","openUnsuitableForCareModal","openCareQualificationsUploadPopup","openCareQualificationsUploadModal","eligibleForCareAnswers","ableToAssistMobility","travelToHomes","carryOutVarietyOfDuties","anyReasonUnsuitable","qualificationsInCare","highDependencyCareExperience","mediumDependencyCareExperience","AvailabilityController","checkDateSelected","getDayTimeMostSearchByClient","dayTimeMost","updateAvailability","AlreadyToGoAndEarnExtraController","goPortal","JobsController","JobService","getPublishedJobs","jobs","job","JobController","goToApplyHere","getJob","getJobByUrl","activeTab","validateFile","require","scope","attrs","ngModel","validImage","$setValidity","validFormats","bind","$apply","$render","$setViewValue","val","$parsers","lastIndexOf","substring","indexOf","directive","videoCustom","detectUtils","model","src","media","sources","poster","options","isMobile","$on","vid","bigPlayButton","hide","controlBar","show","restrict","template","postcodeAutocomplete","listenPlaceChange","geocoder","google","maps","Geocoder","autocomplete","places","Autocomplete","event","addListener","place","getPlace","lat","lng","latlng","LatLng","geocode","latLng","results","address_components","types","townName","long_name","town","countyName","county","country","postCode","getPostCode","shortAddressLine","getShortAddressLine","words","replace","x","postCodeSplit","short_name","abbrevName","addressLine","join","splitWords","str1","split_names","trim","charAt","j","k","componentRestrictions","$invalid","$watch","$modelValue","newValue","oldValue","blur","focus","frm","postcodeAutocompleteCustom","street","route","limitHtml","limit","changedString","String","suffix","substr","toggleSelectClickInput","$select","ToastMessageService","$http","openPopupMessageModal","modalInstance","controllerAs","openAmendRefusedPopupMessageModal","openCandidateCancelledPopupMessageModal","openClientCancelledPopupMessageModal","openClientCancelledPopupBeforePaymentMessageModal","closedNotification","req","method","closedNotifications","ids","factory","lxToastMessage","$interval","getNotifications","state","main","roleName","notifications","showNotifications","stop","selectedNotification","isClose","selectedAmendRefuseNotification","selectedCandidateCancelledNotification","selectedClientCancelledNotification","selectedClientCloseNotification","isShow","openNoResponsePopup","openAmendRefusedPopup","openCandidateCancelledPopup","openClientCancelledPopupBeforePayment","openClientCancelledPopup","closeNotification","bookingIds","promise","start","candidateNote","clientNote","clearInterval","toState","toParams","fromState","fromParams","$compile","$eval","compile","html","contents","signaturePad","formContainer","errorClass","disabled","attributes","resizeCanvas","ratio","Math","max","window","devicePixelRatio","width","canvas","offsetWidth","height","offsetHeight","getContext","scale","_signaturePad","ctx","image","Image","onload","drawImage","wrapper","getElementById","querySelector","watcher","SignaturePad","addEventListener","toDataURL","hasError","$submitted","disable","service","role","getByName","post","userService","$resource","action","dataListFactory","$q","$cacheFactory","httpCache","deferred","defer","getSkills","cache","newStartDate","newEndDate","newStartTime","newEndTime","getHours","getMinutes","confirm","resetPassword","resetPasswordWithToken","sendContact","landingPage","authService","signinWithoutConfirm","token","expireInSeconds","currentUser","reject","signin","self","getLocationFromUserAddress","getCurrentUser","setCurrentUser","userData","isAuthenticated","isAuthenticatedAsync","cb","isAuthorized","authorizedRoles","isArray","authInterceptor","$location","request","config","headers","Authorization","responseError","path","lxScrollTop","whtml","scroll","scrollTop","click","animate","input","min","profileController","buttonPlay","profileStarTooltip","bindToController","lxPdfViewer","pdfSrc","loadPdf","PDFJS","pdfjsLib","pdfJsViewer","pdfjsViewer","externalLinkTarget","LinkTarget","BLANK","disableStream","pdfLinkService","PDFLinkService","container","el","pdfViewer","PDFViewer","linkService","enhanceTextSelection","theViewer","docInitParams","pdfLoadingTask","getDocument","doc","setDocument","lxNav","checkAcceptedPolicy","isAdmin","isCandidate","isClient","isNavCollapsed","checked","hhtml","tabConfig","loginPage","goCandidatePage","goClientPage","homePage","goAdminPage","admin","goFAQPage","faq","goAboutPage","aboutUs","goToFacilitiesManagment","corporate","facilitiesManagement","goToHospitality","hospitality","goToFinalMileDelivery","finalMileDelivery","gotToWarehouse","warehouse","goToManufacturing","manufacturing","goToCare","care","goToCantBePigeonholed","cantBePigeonholed","toggleButton","activeMenu","onclick","stopPropagation","$","target","closest","isEmpty","obj","key","onClickYesStickyBtn","onClickNoStickyBtn","lxLoading","lxFooter","goContacUs","newHash","offset","top","dateFrom","dateTo","timeFrom","timeTo","confirmBooking","$element","changeMinAndMaxDates","getDefaultDate","fromDateOpened","toDateOpened","valueOf","dateToOptions","minDate","changeTimeFrom","minutes","timepicker","changeTimeTo","dateFromOptions","formatYear","startingDay","timePickerFromOptions","showOn","disableTimeRanges","minTime","maxTime","timePickerToOptions","ProfileCandidateController","pos","positionTemp1","positionTemp2","positionTemp3","page","candidatesDataLastFind","calculatePostion","position1","position2","position3","pre","noCandidateAll","candidatesDataFirstFind","extend","redAffix","$document","checkPosition","position","prop","positionTop","offsetTop","pinnedOffset","child","addClass","css","removeClass","resizeChild","c","children","ready","RecruitmentController","clickGoForIndividualsPage","recruitment","clickGoForBusinessPage","getListRecruitmentPage","recruitmentGuide","business","thumbnail","NewsController","news","HowItWorksController","$anchorScroll","clickGoForHowItToWorkForCandidatePage","hash","clickGoForHowItToWorkForClientPage","howItWorkCandidateVideo","howItWorkCandidatePhoto","howItWorkClientVideo","howItWorkClientPhoto","CorporateCotroller","goFindOutMore","create","update","routerConfig","$stateProvider","SignUpController","openEmploymentStatusModal","openReasonRefuseModal","cancelBookingByClient","getAcceptedBooking","refuseRequestBooking","getClientNotifications","ClientPortalController","ShowPhotoOrVideoController","AdminService","ShowPassportController","selectPassportImageLast","passportFile","isHasLastPassportImage","filePassportUrl","pdfFile","ShowInsuranceCodeController","ShowDocumentController","TestSenderController","sender","currentSender","copyOfEmailTemplate","onTestSender","testSenderSchedule","EditVoucherController","currentVoucher","resetCheckExpiry","checkExpiry","checkExpiryDate","expiryDate","checkExpiryOverLimit","checkIsExistedVoucher","form","resetErrorExistedVoucher","vouchers","expiry","onEditVoucher","updateVoucherByAdmin","EditSenderController","loadSendToVariables","loadSendFromVariables","loadSendFirstVariables","loadSendFrequencyVariables","getSendToVariables","sendToVariables","getSendFromVariables","sendFromVariables","getSendFirstVariables","sendFirstVariables","getSendFrequencyVariables","sendFrequencyVariables","emailTemplateUrl","onEditSender","updateSettingSenderSchedule","ShowEditLandingPageController","getPageTypes","getDefaultUrl","getLandingPageDefaultUrl","onSubmitLandingPage","createOrUpdateLandingPage","goToManageLandingPage","onDeleteLandingPage","deleteLandingPage","currentLandingPage","checkUrlExists","checkLandingPageUrlExists","resetErrorUrlExists","manageLandingPage","baseUrl","DeleteUserModal","deleteUser","DeleteSenderModal","deleteSender","DeleteJobModalController","deleteJob","deleteJobByAdmin","SMSSenderController","loadSMSSenders","getSMSSenders","smsSenders","onCreateSMSSender","smsSender","senderType","createSettingSenderSchedule","registerSMSSenderForm","$setUntouched","$setPristine","sortBy","propertyName","reverse","propertyNameExtend","backToAdminPage","openModalEditSender","v","toJson","showEditSenderModal","openModalDeleteSender","showDeleteSenderModal","isDeleted","candidatePageNo","candidatePageSize","clientPageNo","clientPageSize","distance","RegisterVoucherController","getVouchersByAdmin","totalUserCount","listVoucherResponse","loadMoreVoucherCount","loadMoreVoucher","onCreateVoucher","createVoucherByAdmin","registerVoucherForm","openModalEditVoucher","showEditVoucherModal","map","ReceivingEmailPageController","getAllUsersWantToStopReceivingEmail","listUsers","listUsersResponse","loadMoreUserCount","loadMoreUser","onSearchUser","search","receivingEmailStatusFilter","changeStatus","isAllowUserStopReceivingEmail","listReceivingEmailStatus","deleteUserPage","IsAccepted","IsRequested","IsAllowed","ManageBookingController","FileSaver","$log","getBookingsByAdmin","listBookingOrigin","listBooking","totalBookingCount","listBookingResponse","loadMoreBookingCount","loadMoreBooking","onSearchBooking","exportBookings","exportBookingsByAdmin","fileName","blob","Blob","saveAs","toggleFilterButton","isCollapsedFilter","isShowLoginLogOut","isShowStatus","LandingPagesController","getListLandings","getListPagesByAdmin","landingPageNo","landingPageSize","onCreateOrUpdateLandingPage","landingPageTemp","onCreateLandingPage","createLandingPage","onEditLandingPage","editLandingPage","openModalEditLandingPage","showEditLandingPageModal","imageUrl","removeLandingPageImage","copyImage","toolbarOptions","JobManagementController","getListjobs","getJobsByAdmin","jobNo","jobManagementize","totalJob","listJobResponse","loadMoreJob","loadMoreJobs","onCreateJob","createJob","onEditJob","editJob","openModalDeleteJob","showDeleteJobModal","ExportController","loadCandidates","loadClients","getCandidatesByAdmin","totalCandidate","listCandidateResponse","loadMoreCandidate","getClientsByAdmin","listClient","totalClient","listClientResponse","loadMoreClient","loadMoreCandidates","loadMoreClients","exportClients","exportClientsByAdmin","exportCandidates","exportCandidatesByAdmin","EmailSenderController","loadEmailSenders","getEmailSenders","emailSenders","selectFileLast","fileSrc","isHasTemplate","fileTemplateUrl","onCreateEmailSender","emailSender","registerEmailSenderForm","removeTemplateFiles","openModalTestEmailSender","showTestSenderModal","EditLandingPageController","getLandingPage","getLandingPageById","backToLandingPage","EditJobController","getJobById","validThrough","jobTemp","backToJobManagement","jobManagement","checkValidThroughDate","validThroughDate","checkValidThrough","checkValidThroughOverLimit","resetCheckValidThrough","goToJobManagement","updateJobByAdmin","checkJobUrlExists","generateUrl","DeleteUserPagesController","getAllUsersByAdmin","openModalDeleteUser","showDeleteUserModal","CreateLandingPageController","CreateJobController","createJobByAdmin","getJobDefaultUrl","AdminController","getUsersByAdmin","listPassport","listPassportResponse","candidateFilter","mergeUnique","arr1","arr2","userStatus","dateOpened","openTimePicker","viewPhotoOrVideo","$index","showPhotoOrVideoModal","viewPassport","showPassportModal","viewDocument","showDocumentModal","viewInsuranceCode","showInsuranceModal","updateCandidateUserStatus","onGetZegoUserStatus","getZegoUserStatus","zego","onLoginZego","loginZego","onLogoutZego","logoutZego","resendEmail","resendSMS","verifyEmail","updateCandidateVerifiedByAdmin","goToExportPage","goToRegisterVoucherPage","registerVoucher","goToSMSSenderPage","goToEmailSenderPage","goToManageBookingPage","manageBooking","goToDeleteUserPage","goToStopReceivingEmailPage","stopReceivingEmail","goToJobManagementPage","photo","isExist","isNotExist","passport","insurance","isPending","isIllegal","isLegal","isIncorrectIDFile","emailConfirmedStatus","isConfirmed","isNotConfirmed","timeStamp","listPassportOrigin","listUserStatus","getCandidateNotifications","getRefusedBooking","userId","getClientUserById","yunoQuiz","helpUsToHelpYou","CandidatePortalController","openPhotoToolTipModal","tempstaff","TempStaffController","goLookForWork","goLookForStaff","contact","sendEmail","ResetPasswordController","sendEmailResponse","confirmEmailResponse","resetSendEmail","resetConfirmEmail","LoginController","removeErrorText","loginUser","$broadcast","candidateLogin","clientLogin","adminLogin","loggedIn","root","abstract","HomeController","costEffectiveTempStaff","CostEffectiveTempStaffController","usersFactory","username","Api","v2","btoa","getAuth","$localStorageuser","Username","Password","signOut","Token","identifier","Result","uri","put","Content-Type","Filename","transformRequest","identity","careEmployer","searchCareCandidates","searchFilters","CorporateController","openStarRatingContent","privacyPolicy","livingWage","howItWorks","CommonController","delUser","delSender","responseType","LandingPageService","getLandingPageByUrl","LandingPageController","includes","runBlock","checkUserLogin","from","to","hasLogin","isAcceptedGoToPortal","checkAcceptedGoToPortal","isAcceptedGoToSignUp","checkAcceptedGoToSignUp","isAcceptedGoToAdmin","checkAcceptedGoToAdmin","preventDefault","noLogin","checkExpireInSeconds","checkUserLoginWithoutConfirm","wisepops","constant","run","_","getUserProfile","policy","rotateLeft","rotateRight","zoomIn","zoomOut","fit","acceptedReceivingEmail","requestedStopReceivingEmail","allowedUserStopReceivingEmail","disableTextInput","second","Additional","BestMatch","ownPage","label","export","$urlRouterProvider","$httpProvider","$locationProvider","$logProvider","ngIntlTelInputProvider","ngToastProvider","otherwise","interceptors","initialCountry","debugEnabled","configure","animation","horizontalPosition","verticalPosition","hashPrefix","html5Mode","$templateCache"],"mappings":"CAAA,WACI,YAEAA,SACKC,OAAO,mBAIhB,WACI,YAOA,SAASC,GAAuBC,GAG5B,QAASC,KACLD,EAAkBC,OAAM,GAH5B,GAAIC,GAAKC,IACTD,GAAGD,MAAQA,EAPfF,EAAuBK,SAAW,qBAAlCP,QACKC,OAAO,aACPO,WAAW,yBAA0BN,MAa9C,WACI,YAOA,SAASO,GAAiCN,EAAkBO,EAAcC,EAAqBC,EAAYC,GASvG,QAAST,KACLD,EAAkBC,OAAM,GAG5B,QAASU,KACD,GAAIC,MAAS,GAAIA,MAAKV,EAAGQ,aAAaG,eAAA,OACtCX,EAAGY,UAAW,EACdZ,EAAGa,UAAY,IAEX,GAAIH,MAAS,GAAIA,MAAKV,EAAGQ,aAAaG,eAAA,OAA4C,GAAID,MAAS,GAAIA,MAAKV,EAAGQ,aAAaG,gBAAA,MACxHX,EAAGc,cAAe,EAElBd,EAAGe,cAAe,EAG1BT,EAAoBU,WAAWhB,EAAGQ,aAAaS,WAAWC,KAAK,SAASC,GACpEnB,EAAGoB,YAAcD,EAAKA,KAAKE,SAGnC,QAASC,GAAUC,EAAWC,GAC3B,MAAOnB,GAAciB,UAAUC,EAAWC,GA5B7C,GAAIxB,GAAKC,IACTD,GAAGD,MAAQA,EACXC,EAAGQ,aAAeA,EAClBR,EAAGsB,UAAYA,EACftB,EAAGY,UAAW,EACdZ,EAAGc,cAAe,EAClBd,EAAGe,cAAe,EAClBN,IAZJL,EAAiCF,SAAW,oBAAqB,gBAAiB,sBAAuB,aAAc,gBADvHP,QACKC,OAAO,aACPO,WAAW,mCAAoCC,MAsCxD,WACI,YAOA,SAASqB,GAAmD3B,EAAkBU,GAI1E,QAAST,KACLD,EAAkBC,OAAM,GAJ5B,GAAIC,GAAKC,IACTD,GAAGD,MAAQA,EACXC,EAAGQ,aAAeA,EANtBiB,EAAmDvB,SAAW,oBAAqB,gBAFnFP,QACKC,OAAO,a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BACxEyE,EAAezE,IAAI,gDAAgD,i3BACnEyE,EAAezE,IAAI,iDAAiD,q/JACpEyE,EAAezE,IAAI,kDAAkD,0hJACrEyE,EAAezE,IAAI,+CAA+C,0kDAClEyE,EAAezE,IAAI,iDAAiD,49GACpEyE,EAAezE,IAAI,8CAA8C;AACjEyE,EAAezE,IAAI,6CAA6C,woDAChEyE,EAAezE,IAAI,+CAA+C,shCAClEyE,EAAezE,IAAI,+CAA+C,6+BAClEyE,EAAezE,IAAI,6CAA6C,m8BAChEyE,EAAezE,IAAI,gDAAgD,+iTACnEyE,EAAezE,IAAI,+CAA+C,u0BAClEyE,EAAezE,IAAI,8CAA8C,+nFACjEyE,EAAezE,IAAI,yCAAyC,ynCAC5DyE,EAAezE,IAAI,uCAAuC,wnHAC1DyE,EAAezE,IAAI,oDAAoD,srGACvEyE,EAAezE,IAAI,kEAAkE,+jBACrFyE,EAAezE,IAAI,wEAAwE,4kBAC3FyE,EAAezE,IAAI,uFAAuF,4kBAC1GyE,EAAezE,IAAI,qEAAqE,q2DACxFyE,EAAezE,IAAI,sDAAsD","file":"scripts/app-a3ba82b4d2.js","sourcesContent":["(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client', []);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('PopupMessageController', PopupMessageController);\r\n\r\n /** @ngInject */\r\n function PopupMessageController($uibModalInstance) {\r\n var vm = this;\r\n vm.close = close;\r\n function close() {\r\n $uibModalInstance.close(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('lx.client')\r\n .controller('ClientCancelledMessageController', ClientCancelledMessageController);\r\n\r\n /** @ngInject */\r\n function ClientCancelledMessageController($uibModalInstance,CommonService,ClientPortalService, $rootScope, notification) {\r\n var vm = this;\r\n vm.close = close;\r\n vm.notification = notification;\r\n vm.checkDate = checkDate;\r\n vm.isOver24 = false;\r\n vm.isLessThan24 = false ;\r\n vm.isLessThan12 = false;\r\n active();\r\n function close() {\r\n $uibModalInstance.close(true);\r\n }\r\n\r\n function active() {\r\n if (new Date() - new Date(vm.notification.contactedDate) > ( 1000 * 60 * 60 * 24 )) {\r\n vm.isOver24 = true;\r\n vm.feeCancel = 10;\r\n } else {\r\n if (new Date() - new Date(vm.notification.contactedDate) > ( 1000 * 60 * 60 * 12 ) && new Date() - new Date(vm.notification.contactedDate) <= ( 1000 * 60 * 60 * 24 )) {\r\n vm.isLessThan24 = true;\r\n } else {\r\n vm.isLessThan12 = true;\r\n }\r\n }\r\n ClientPortalService.getBooking(vm.notification.bookingId).then(function(data){\r\n vm.timeCancell = data.data.result;\r\n })\r\n }\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ClientCancelledPopupBeforePaymentMessageController', ClientCancelledPopupBeforePaymentMessageController);\r\n\r\n /** @ngInject */\r\n function ClientCancelledPopupBeforePaymentMessageController($uibModalInstance,notification) {\r\n var vm = this;\r\n vm.close = close;\r\n vm.notification = notification;\r\n function close() {\r\n $uibModalInstance.close(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('lx.client')\r\n .controller('CandidateCancelledMessageController', CandidateCancelledMessageController);\r\n\r\n /** @ngInject */\r\n function CandidateCancelledMessageController($uibModalInstance) {\r\n var vm = this;\r\n vm.close = close;\r\n function close() {\r\n $uibModalInstance.close(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('lx.client')\r\n .controller('AmendRefusedPopupMessageController', AmendRefusedPopupMessageController);\r\n\r\n /** @ngInject */\r\n function AmendRefusedPopupMessageController($uibModalInstance) {\r\n var vm = this;\r\n vm.close = close;\r\n function close() {\r\n $uibModalInstance.close(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('lx.client')\r\n .controller('SignUpStaffRequirementsController', SignUpStaffRequirementsController);\r\n\r\n /** @ngInject */\r\n function SignUpStaffRequirementsController($state, $localStorage, SignupClientService, CONFIG,$rootScope, dataList) {\r\n var vm = this;\r\n vm.userClient = $localStorage.userProfile ? angular.copy($localStorage.userProfile) : {};\r\n vm.updateClient = updateClient;\r\n activate();\r\n function activate() {\r\n getTypeOfWork();\r\n getEmploymentStatuses();\r\n getKeySkills();\r\n getWorkExperiences();\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n dataList.getEmploymentStatuses().then(function (data) {\r\n vm.employmentStatuses = data.data.result.items;\r\n })\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\r\n })\r\n }\r\n\r\n function updateClient() {\r\n $rootScope.loading = true;\r\n vm.userClient.id = $localStorage.userProfile.id || vm.userClient.companyProfile.id;\r\n SignupClientService.updateClient(vm.userClient).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n $state.go(CONFIG.routes.client.signup.candidates);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('SignUpHomeController', SignUpHomeController);\r\n\r\n /** @ngInject */\r\n function SignUpHomeController($state, $localStorage, dataList, CONFIG, SignupClientService) {\r\n\r\n var vm = this;\r\n vm.jobSearchHomeForm = {};\r\n vm.userClient = $localStorage.searchFilter ? angular.copy($localStorage.searchFilter) : {};\r\n vm.timePickerDefault = CONFIG.timePickerDefault;\r\n var date = moment().toDate();\r\n vm.userClient.dateTimeFilters = [\r\n {\r\n startDate: date,\r\n endDate: moment(date).set('date', moment(date).date() + 7).toDate(),\r\n startTime: moment(vm.timePickerDefault.startTime),\r\n endTime: moment(vm.timePickerDefault.endTime)\r\n }\r\n ];\r\n\r\n vm.findMeStaff = findMeStaff;\r\n activate();\r\n getVoucher();\r\n function activate() {\r\n getTypeOfWork();\r\n }\r\n\r\n function getVoucher() {\r\n SignupClientService.getVoucher().then(function (data) {\r\n vm.voucher = data.data.result;\r\n }, function (error) {\r\n console.log(error)\r\n });\r\n }\r\n\r\n function findMeStaff() {\r\n if (vm.jobSearchHomeForm.$valid) {\r\n $localStorage.searchFilter = vm.userClient;\r\n $state.go(CONFIG.routes.client.signup.findMeStaff);\r\n }\r\n\r\n }\r\n\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\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('lx.client')\r\n .controller('SignUpFinishController', SignUpFinishController);\r\n\r\n /** @ngInject */\r\n function SignUpFinishController($state,$uibModal, $localStorage,$rootScope,ClientPortalService,CONFIG, ngToast) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.client.signup.home);\r\n return;\r\n }\r\n var vm = this;\r\n vm.hasBooking = $state.params.type == 1 ? true : false;\r\n vm.accessPortal = accessPortal;\r\n vm.userClient = $localStorage.userProfile ? angular.copy($localStorage.userProfile) : {}\r\n vm.sendClientConfirmEmailViaPhoneNumber = sendClientConfirmEmailViaPhoneNumber;\r\n vm.receivedEmail = receivedEmail;\r\n function accessPortal() {\r\n if (vm.userClient.isEmailConfirmed) {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n }\r\n function sendClientConfirmEmailViaPhoneNumber(){\r\n $rootScope.loading = true;\r\n ClientPortalService.sendClientConfirmEmailViaPhoneNumber(vm.userClient.id).then(function(){\r\n $rootScope.loading = false;\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/common/confirmEmail.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.login)\r\n }\r\n },\r\n size :'md'\r\n });\r\n },function(error){\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function receivedEmail(){\r\n $rootScope.loading = true;\r\n ClientPortalService.sendClientConfirmEmail(vm.userClient.id).then(function(){\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/common/receivedEmail.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.login)\r\n }\r\n $scope.noSendEmail=function(){\r\n $rootScope.loading = true;\r\n ClientPortalService.sendClientConfirmEmail(vm.userClient.id).then(function(){\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n };\r\n },\r\n size :'md'\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('lx.client')\r\n .controller('SignUpFindMeStaffController', SignUpFindMeStaffController);\r\n\r\n /** @ngInject */\r\n function SignUpFindMeStaffController($state, $rootScope, $localStorage,SignupClientService,CONFIG) {\r\n var vm = this;\r\n vm.userFindCandidate = $localStorage.searchFilter ? angular.copy($localStorage.searchFilter) : {};\r\n vm.goHome = goHome;\r\n vm.bookStaff = bookStaff;\r\n active();\r\n function active() {\r\n if (angular.equals({}, vm.userFindCandidate)) {\r\n goHome();\r\n } else {\r\n $rootScope.loading = true;\r\n vm.staffList = angular.copy(angular.merge(vm.userFindCandidate, {pageSize: 3, pageNo: 1}));\r\n SignupClientService.findStaffs(vm.staffList).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.candidates = data.data.result.items\r\n if(vm.candidates.length == 0){\r\n vm.candidatesNoItems = 'No candidate have matched your criterea, however new candidates are registering all the time'\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n console.log(error)\r\n });\r\n }\r\n\r\n }\r\n\r\n function goHome() {\r\n $state.go(CONFIG.routes.client.signup.home);\r\n }\r\n\r\n function bookStaff() {\r\n $state.go(CONFIG.routes.client.signup.clientProfile);\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('lx.client')\r\n .controller('SignUpClientConfirmEmailController', SignUpClientConfirmEmailController);\r\n\r\n /** @ngInject */\r\n function SignUpClientConfirmEmailController($stateParams, Auth, $rootScope, $state, CommonService, $localStorage, CONFIG) {\r\n var vm = this;\r\n vm.confirmResponse = null;\r\n vm.redirectLink = redirectLink;\r\n vm.goHome = goHome;\r\n active();\r\n\r\n function active() {\r\n $rootScope.loading = true;\r\n if ($localStorage.userProfile && $stateParams.id != $localStorage.userProfile.id) {\r\n delete $localStorage.userProfile;\r\n }\r\n CommonService.confirmEmail($stateParams.id, $stateParams.code).then(function (res) {\r\n $rootScope.loading = false;\r\n vm.confirmSuccess = 1;\r\n vm.confirmResponse = res.data;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.confirmSuccess = 2;\r\n });\r\n }\r\n\r\n function redirectLink() {\r\n if ($localStorage.userProfile) {\r\n $localStorage.userProfile.isEmailConfirmed = true;\r\n $state.go(CONFIG.routes.client.portal.welcomeBack)\r\n } else {\r\n Auth.logout();\r\n $rootScope.isHasLogin = true;\r\n $state.go(CONFIG.routes.login)\r\n }\r\n\r\n }\r\n\r\n function goHome() {\r\n $state.go(CONFIG.routes.home)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('SignUpClientProfileController', SignUpClientProfileController);\r\n\r\n /** @ngInject */\r\n function SignUpClientProfileController($state, CONFIG, $rootScope, $localStorage, dataList, UserRoleService, Auth, SignupClientService) {\r\n var vm = this;\r\n vm.clientProfileForm = [];\r\n vm.userClient = $localStorage.searchFilter ? angular.copy($localStorage.searchFilter) : {} ;\r\n\r\n if (!vm.userClient) {\r\n $state.go(CONFIG.routes.client.signup.home);\r\n }\r\n vm.clientRole = {};\r\n vm.onCreateOrUpdateClient = onCreateOrUpdateClient;\r\n vm.userClient.isAcceptedGDPR = true;\r\n active();\r\n function active() {\r\n getNatureOfBusiness();\r\n getClientRole();\r\n }\r\n\r\n function getClientRole() {\r\n UserRoleService.getRoleByName(CONFIG.userRoles.client).then(function (data) {\r\n vm.clientRole = data.data.result;\r\n })\r\n }\r\n\r\n function onCreateOrUpdateClient() {\r\n if (vm.clientProfileForm.$valid) {\r\n vm.userClient.roleId = vm.clientRole.id;\r\n vm.userClient.isActive = true;\r\n vm.userClient.id = vm.userClient.id || '';\r\n $rootScope.loading = true;\r\n if (!vm.userClient.id) {\r\n SignupClientService.createClient(vm.userClient).then(function (data) {\r\n var user = {\r\n userNameOrEmailAddress: vm.userClient.emailAddress,\r\n password: vm.userClient.password\r\n };\r\n $localStorage.userProfile = data.data;\r\n $localStorage.isSignup = true;\r\n Auth.loginWithoutConfirm(user).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.signup.staffRequirements);\r\n }, function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.login)\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n } else {\r\n SignupClientService.updateClientUserProfile(vm.userClient).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n $state.go(CONFIG.routes.client.signup.staffRequirements);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n }\r\n }\r\n }\r\n\r\n function getNatureOfBusiness() {\r\n dataList.getBusinessTypes().then(function (data) {\r\n vm.natureOfBusiness = data.data.result.items;\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('lx.client')\r\n .controller('SignUpCandidateController', SignUpCandidateController);\r\n\r\n /** @ngInject */\r\n function SignUpCandidateController($state, $rootScope,CONFIG, $localStorage, SignupClientService) {\r\n if (!$localStorage.userProfile) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.signup.home);\r\n return;\r\n }\r\n var vm = this;\r\n vm.bookCandidateId = [];\r\n vm.listAdditionalCandidateId = [];\r\n vm.userClient = angular.copy($localStorage.userProfile);\r\n vm.finishRegistration = finishRegistration;\r\n vm.onCandidateChanged = onCandidateChanged;\r\n vm.completeWithoutCreateBooking = completeWithoutCreateBooking;\r\n function finishRegistration() {\r\n if (vm.bookCandidateId.length > 0) {\r\n $rootScope.loading = true;\r\n vm.book = {\r\n clientId: vm.userClient.id,\r\n candidateIds: vm.bookCandidateId,\r\n additionalCandidateIds: vm.listAdditionalCandidateId,\r\n dateTimeFilters: [{\r\n startDate : vm.userClient.dateTimeFilters[0].startDate,\r\n endDate : vm.userClient.dateTimeFilters[0].endDate,\r\n startTime : new Date(vm.userClient.dateTimeFilters[0].startTime),\r\n endTime : new Date(vm.userClient.dateTimeFilters[0].endTime),\r\n }]\r\n };\r\n SignupClientService.createBookings(vm.book).then(function (data) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.signup.finish,{type : 1});\r\n },function (error) {\r\n $rootScope.loading = false;\r\n vm.errorMessage = error.data.exceptionMessage;\r\n });\r\n } else {\r\n $state.go(CONFIG.routes.client.signup.finish,{type : 2});\r\n }\r\n }\r\n\r\n function onCandidateChanged(cadidates, listCandidate) {\r\n var arr = [];\r\n if (cadidates.length > 0) {\r\n angular.forEach(cadidates, function (data) {\r\n if (data.candidate)\r\n arr.push(data.candidate.id)\r\n });\r\n vm.bookCandidateId = arr;\r\n vm.listAdditionalCandidateId = getlistAdditionalCandidateId(listCandidate, arr);\r\n }\r\n }\r\n function getlistAdditionalCandidateId(listCandidate, listselectedCandidate) {\r\n var listAdditionalCandidateId = [];\r\n angular.forEach(listCandidate, function (item) {\r\n if (isMainCandidate(item, listselectedCandidate) == false) {\r\n if (listAdditionalCandidateId.length < 7) {\r\n listAdditionalCandidateId.push(item.id);\r\n } else {\r\n return listAdditionalCandidateId;\r\n }\r\n }\r\n })\r\n return listAdditionalCandidateId;\r\n }\r\n function isMainCandidate(candidate, candidates) {\r\n var check = false;\r\n angular.forEach(candidates, function (item) {\r\n if (item == candidate.id) {\r\n return check = true;\r\n }\r\n })\r\n return check;\r\n }\r\n function completeWithoutCreateBooking() {\r\n $state.go(CONFIG.routes.client.signup.finish,{type : 2});\r\n }\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ReportIssueMessageModalController', ReportIssueMessageModalController);\r\n\r\n /** @ngInject */\r\n function ReportIssueMessageModalController($uibModalInstance, booking, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.booking= booking;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n vm.openTermCondition = openTermCondition;\r\n function ok() {\r\n $uibModalInstance.close(true);\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function openTermCondition() {\r\n ClientPortalService.openTermConditionModal();\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ReportIssueModalController', ReportIssueModalController);\r\n\r\n /** @ngInject */\r\n function ReportIssueModalController($uibModalInstance, booking) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.otherIssue = null;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n function ok() {\r\n if(vm.otherIssue)\r\n $uibModalInstance.close({otherIssue: vm.otherIssue});\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ReasonRefuseController', ReasonRefuseController);\r\n\r\n /** @ngInject */\r\n function ReasonRefuseController( $uibModalInstance) {\r\n\r\n var vm = this;\r\n vm.data=[];\r\n vm.getReasons=getReasons;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n\r\n vm.isChecked = isChecked;\r\n vm.sync = sync;\r\n active();\r\n function active() {\r\n getReasons();\r\n }\r\n\r\n function ok() {\r\n $uibModalInstance.close(true);\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function getReasons() {\r\n var reasons =[\r\n {id: 1, name: 'Unavailable'},\r\n {id: 2, name: 'Wrong type of work'},\r\n {id: 3, name: 'To far to travel'}\r\n ];\r\n vm.reasons = reasons;\r\n }\r\n function isChecked(id){\r\n var match = false;\r\n for(var i=0 ; i < vm.data.length; i++) {\r\n if(vm.data[i].id == id){\r\n match = true;\r\n }\r\n }\r\n return match;\r\n };\r\n function sync (bool, item){\r\n if(bool){\r\n vm.data.push(item);\r\n } else {\r\n for(var i=0 ; i < vm.data.length; i++) {\r\n if(vm.data[i].id == item.id){\r\n vm.data.splice(i,1);\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('lx.client')\r\n .controller('ProfileModalController', ProfileModalController);\r\n\r\n /** @ngInject */\r\n function ProfileModalController($uibModalInstance,$rootScope,CommonService, profile, ClientPortalService,$scope, CONFIG,$state) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.isPlay = true;\r\n vm.link = CONFIG.rest.baseURILink;\r\n getProfileUser()\r\n function getProfileUser(){\r\n $rootScope.loading = true;\r\n ClientPortalService.getCandidateUserById(profile).then(function(data){\r\n $rootScope.loading = false;\r\n vm.profile = data.data.result;\r\n },function(){\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function getDayofWeek(d, num) {\r\n d = moment(d);\r\n var day = moment(d).day(),\r\n diff = moment(d).date() - day + num,\r\n current = moment(d).date();\r\n if (diff < current) {\r\n return moment(d).set('date' , diff + 7);\r\n } else {\r\n return moment(d).set('date' , diff);\r\n }\r\n\r\n }\r\n vm.getDateOfWeek = function (d) {\r\n return CommonService.getDateOfWeek(d)\r\n };\r\n vm.formatDate = function (d) {\r\n return CommonService.formatDate(d);\r\n };\r\n vm.play = function play(e) {\r\n if(!vm.profile.profile.videoType) return;\r\n var elem = angular.element(e.currentTarget).parent().find('video');\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n elem.muted = \"muted\";\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeOut()\r\n elem.on('ended', function () {\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n }\r\n })\r\n } else {\r\n elem[0].pause();\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeIn()\r\n }\r\n\r\n };\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\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('lx.client')\r\n .controller('FutureBookingClientController', FutureBookingClientController);\r\n\r\n /** @ngInject */\r\n function FutureBookingClientController(booking,CommonService ,CONFIG,ClientPortalService,$uibModalInstance, $state) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.cancel = cancel;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.goToAmendBooking = goToAmendBooking;\r\n vm.formatDate = formatDate\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n\r\n function goToAmendBooking(id) {\r\n $uibModalInstance.dismiss('cancel');\r\n $state.go(CONFIG.routes.client.portal.amendBooking, {'id': id});\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('EmploymentStatusController', EmploymentStatusController);\r\n\r\n /** @ngInject */\r\n function EmploymentStatusController($uibModalInstance) {\r\n\r\n var vm = this;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n active();\r\n\r\n function ok() {\r\n $uibModalInstance.close(true);\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function active() {\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ConfirmCancellationController', CancelBookingConfirmController);\r\n\r\n /** @ngInject */\r\n function CancelBookingConfirmController(booking, $rootScope, ClientPortalService,CONFIG, $uibModalInstance, $state) {\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.isOver24 = false;\r\n vm.feeCancel = 120;\r\n vm.feeAdmin = 5;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n active();\r\n\r\n function ok() {\r\n $rootScope.loading = true;\r\n ClientPortalService.cancelledBooking(vm.booking.id).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n },function(){\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n });\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function active() {\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('CancelBookingConfirmController', CancelBookingConfirmController);\r\n\r\n /** @ngInject */\r\n function CancelBookingConfirmController(booking,$rootScope,$window, $uibModalInstance,CONFIG, ClientPortalService, $state) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.isOver24 = false;\r\n vm.isUnder24 = false;\r\n vm.isUnder12 = false;\r\n vm.feeAdmin = 5;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n vm.close = close;\r\n vm.acceptCancel = acceptCancel;\r\n vm.openTermCondition = openTermCondition;\r\n active();\r\n\r\n function ok() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function close() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function cancel() {\r\n ClientPortalService.openConfirmCancellationModal(vm.booking).then(function () {\r\n $uibModalInstance.dismiss('cancel');\r\n });\r\n }\r\n\r\n function openTermCondition() {\r\n var openTermConditionUrl = $state.href(CONFIG.routes.common.termsConditions);\r\n $window.open(openTermConditionUrl,'_blank');\r\n }\r\n function acceptCancel() {\r\n $rootScope.loading = true;\r\n ClientPortalService.cancelledBooking(vm.booking.id).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n },function(){\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n });\r\n }\r\n function active() {\r\n var bookingDate = new Date(moment(vm.booking.startDate).year(),moment(vm.booking.startDate).month(), moment(vm.booking.startDate).date(),moment(vm.booking.startTime).hour(),moment(vm.booking.startTime).minute())\r\n vm.status = vm.booking.status;\r\n vm.feeCancel = 0;\r\n if(!vm.booking.invoice) return;\r\n vm.hadPayment = vm.booking.invoice.paidAmount > 0 ? true : false;\r\n if (bookingDate - new Date() > ( 1000 * 60 * 60 * 24 )) {\r\n vm.feeCancel = vm.booking.invoice.lbFee;\r\n vm.isOver24 = true;\r\n }else if(bookingDate - new Date() < ( 1000 * 60 * 60 * 24 ) &&\r\n bookingDate - new Date() > ( 1000 * 60 * 60 * 12 )) {\r\n vm.isUnder24 = true;\r\n vm.feeCancel = vm.booking.invoice.candAmount/2;\r\n }else{\r\n vm.isUnder12 = true;\r\n vm.feeCancel = vm.booking.invoice.candAmount;\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('lx.client')\r\n .controller('BookingHistoryClientController', BookingHistoryClientController);\r\n\r\n /** @ngInject */\r\n function BookingHistoryClientController(booking,CommonService,CONFIG, ClientPortalService,$uibModalInstance, $state) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.goToReBooking = goToReBooking;\r\n vm.cancel = cancel;\r\n vm.checkTime = checkTime;\r\n vm.checkDate = checkDate;\r\n vm.formatDate = formatDate;\r\n function goToReBooking(invoiceNo) {\r\n $uibModalInstance.dismiss('cancel');\r\n $state.go(CONFIG.routes.client.portal.reBooking, {'id': invoiceNo}, {reload: true});\r\n\r\n }\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function formatDate(d) {\r\n return CommonService.formatDate(d)\r\n };\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('HomePageClientController', HomePageClientController);\r\n\r\n /** @ngInject */\r\n function HomePageClientController($state,CONFIG,$localStorage) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.goFindTheStaff = goFindTheStaff;\r\n vm.goCompanyProfile = goCompanyProfile;\r\n vm.goBookingsInformation = goBookingsInformation;\r\n vm.goReportIssue = goReportIssue;\r\n function goFindTheStaff(){\r\n $state.go(CONFIG.routes.client.portal.findTheStaff);\r\n }\r\n function goCompanyProfile(){\r\n $state.go(CONFIG.routes.client.portal.companyProfile);\r\n }\r\n function goBookingsInformation(){\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }\r\n function goReportIssue(){\r\n $state.go(CONFIG.routes.client.portal.reportIssue);\r\n }\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ReportIssueController', ReportIssueController);\r\n\r\n /** @ngInject */\r\n function ReportIssueController($rootScope, ClientPortalService, CONFIG,$state) {\r\n\r\n var vm = this;\r\n vm.bookings =[];\r\n vm.openReportIssuePopup = openReportIssuePopup;\r\n vm.openReportIssueMessagePopup = openReportIssueMessagePopup;\r\n vm.goBackHomePage = goBackHomePage;\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getClientRequestBookings().then(function (data) {\r\n $rootScope.loading = false;\r\n vm.bookings = data.data.result;\r\n if(vm.bookings.length == 0){\r\n vm.noReportIssue = \"No bookings registered\";\r\n }\r\n return vm.bookings;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noReportIssue = \"No bookings registered\";\r\n })\r\n }\r\n function goBackHomePage(){\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n function openReportIssuePopup(booking) {\r\n ClientPortalService.openReportIssueModal(booking).then(function (data) {\r\n $rootScope.loading = true;\r\n ClientPortalService.reportOtherIssueBooking(booking.id, data).then(function (data) {\r\n $rootScope.loading = false;\r\n booking = data.data.result;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n });\r\n }\r\n\r\n function openReportIssueMessagePopup(booking) {\r\n ClientPortalService.openReportIssueMessageModal(booking).then(function (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('lx.client')\r\n .controller('ReBookingController', ReBookingController);\r\n\r\n /** @ngInject */\r\n function ReBookingController($state,$filter,$scope, $rootScope,CONFIG, ClientPortalService, ngToast) {\r\n\r\n var vm = this;\r\n vm.reBooking = {};\r\n vm.goToConfirmedBooking = goToConfirmedBooking;\r\n vm.goToHireCandidate = goToHireCandidate;\r\n vm.calculatorAmount = calculatorAmount;\r\n vm.goBackHomePage = goBackHomePage;\r\n var newDate = moment();\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.reBooking = data.data.result;\r\n vm.reBooking.startTime = angular.copy(moment(vm.reBooking.startTime));\r\n vm.reBooking.endTime = angular.copy(moment(vm.reBooking.endTime));\r\n vm.reBooking.startDate =checkCompareDate(moment(vm.reBooking.startDate));\r\n vm.reBooking.endDate =checkCompareDate(moment(vm.reBooking.endDate));\r\n if(vm.reBooking.invoice){\r\n vm.amountBooking = vm.reBooking.invoice.amount\r\n }\r\n if(vm.reBooking.potentialCandidates.length == 1){\r\n ClientPortalService.getCandidateUserById(vm.reBooking.potentialCandidates[0].candidateId).then(function(data){\r\n $rootScope.loading = false;\r\n vm.candidateUser = data.data.result;\r\n },function(err){\r\n $rootScope.loading = false;\r\n var message='Cannot find candidate';\r\n if(err.data && err.data.exceptionMessage){\r\n message= err.data.exceptionMessage;\r\n }\r\n ngToast.warning(message);\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }else{\r\n $rootScope.loading = false;\r\n }\r\n return vm.reBooking;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n });\r\n }\r\n function checkCompareDate(reBookingDate){\r\n if(reBookingDate.year() < newDate.year()) return moment(newDate).toDate();\r\n if(reBookingDate.year() == newDate.year() &&\r\n reBookingDate.month() < newDate.month()) return moment(newDate).toDate();\r\n if(reBookingDate.year() == newDate.year() &&\r\n reBookingDate.month() == newDate.month() &&\r\n reBookingDate.date() < newDate.date()) return moment(newDate).toDate();\r\n return moment(reBookingDate).toDate() ;\r\n }\r\n function goToConfirmedBooking(id) {\r\n var data = {\r\n clientId: vm.reBooking.clientId,\r\n startTime: moment(vm.reBooking.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(vm.reBooking.endTime).format(CONFIG.timeFormat),\r\n startDate: moment(vm.reBooking.startDate).format(CONFIG.dateFormat),\r\n endDate: moment(vm.reBooking.endDate).format(CONFIG.dateFormat)\r\n };\r\n $rootScope.loading = true;\r\n ClientPortalService.reBooking(id, data).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n });\r\n }\r\n function goBackHomePage(){\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n function goToHireCandidate(id) {\r\n $state.go(CONFIG.routes.client.portal.permanentRole, {'id': vm.reBooking.id});\r\n }\r\n function calculatorAmount(){\r\n var data = {\r\n startTime: moment(vm.reBooking.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(vm.reBooking.endTime).format(CONFIG.timeFormat),\r\n startDate: moment(vm.reBooking.startDate).format(CONFIG.dateFormat),\r\n endDate: moment(vm.reBooking.endDate).format(CONFIG.dateFormat)\r\n };\r\n $rootScope.loading = true;\r\n ClientPortalService.calculatorAmount($state.params.id,data).then(function(data){\r\n vm.amountBooking = data.data.result;\r\n $rootScope.loading = false;\r\n },function(){\r\n $rootScope.loading = false;\r\n })\r\n }\r\n $scope.$watchGroup(['vm.reBooking.startTime', 'vm.reBooking.endTime','vm.reBooking.startDate','vm.reBooking.endDate'],\r\n function(newValues, oldValues){\r\n if(oldValues[0] && oldValues[1] && oldValues[2] && oldValues[3] && vm.candidateUser)\r\n calculatorAmount();\r\n }\r\n )\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('RatingStarClientController', RatingStarClientController);\r\n\r\n /** @ngInject */\r\n function RatingStarClientController($state, $rootScope, CONFIG,ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.submitRatingStar = submitRatingStar;\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.ratingStar = data.data.result;\r\n ClientPortalService.getCandidateRateByClient(vm.ratingStar.potentialCandidates[0].id).then(function (data) {\r\n vm.ratingStarList = data.data.result || {};\r\n vm.ratingStarListOrigin = angular.copy(vm.ratingStarList)\r\n ClientPortalService.getCandidateUserById(vm.ratingStar.potentialCandidates[0].candidateId).then(function(data){\r\n vm.candidateUser = data.data.result;\r\n $rootScope.loading = false;\r\n },function(){\r\n $rootScope.loading = false;\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function submitRatingStar() {\r\n var resultCompare = angular.equals(vm.ratingStarList, vm.ratingStarListOrigin);\r\n if(!resultCompare){\r\n $rootScope.loading = true;\r\n ClientPortalService.rateCandidate(vm.ratingStar.potentialCandidates[0].id, vm.ratingStarList).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.welcomeBack)\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }else{\r\n $state.go(CONFIG.routes.client.portal.welcomeBack)\r\n }\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('PermanentRoleController', PermanentRoleController);\r\n\r\n /** @ngInject */\r\n function PermanentRoleController($state, $rootScope,$uibModal,CONFIG, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.permanentRoleSubmit = permanentRoleSubmit;\r\n vm.dateOptions = CONFIG.dateOptions;\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.permanentRoleForm = {};\r\n vm.calendarPopup = {\r\n startDateOpened: false\r\n };\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBooking($state.params.id).then(function (data) {\r\n vm.permanentRole = data.data.result;\r\n vm.permanentRole.startTime = moment(vm.permanentRole.startTime);\r\n vm.permanentRole.endTime = moment(vm.permanentRole.endTime);\r\n vm.permanentRole.startDate = moment(vm.permanentRole.startDate).toDate();\r\n vm.permanentRole.endDate = moment(vm.permanentRole.endDate).toDate();\r\n if(vm.permanentRole.potentialCandidates.length == 1){\r\n ClientPortalService.getCandidateUserById(vm.permanentRole.potentialCandidates[0].candidateId).then(function(data){\r\n vm.candidateUser = data.data.result;\r\n $rootScope.loading = false;\r\n },function(){\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }else{\r\n $rootScope.loading = false;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }\r\n function openCalendarPopup() {\r\n vm.calendarPopup.startDateOpened = true;\r\n }\r\n function permanentRoleSubmit(){\r\n $rootScope.loading = true;\r\n vm.candidate = angular.merge(vm.candidate,{candidateId : vm.candidateUser .id});\r\n ClientPortalService.permanentRole(vm.candidate).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\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('lx.client')\r\n .controller('MakePaymentController', MakePaymentController);\r\n\r\n /** @ngInject */\r\n function MakePaymentController($state, $rootScope,CONFIG,$uibModal, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.paidBooking = paidBooking;\r\n vm.goBackHomePage = goBackHomePage;\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.makePayment = data.data.result;\r\n if(vm.makePayment.status != 1) { $state.go(CONFIG.routes.client.portal.bookingsInformation); }\r\n vm.makePayment.startTime = moment(vm.makePayment.startTime);\r\n vm.makePayment.endTime = moment(vm.makePayment.endTime);\r\n vm.makePayment.startDate = new Date(vm.makePayment.startDate);\r\n vm.makePayment.endDate = new Date(vm.makePayment.endDate);\r\n ClientPortalService.getVATBooking().then(function (data) {\r\n vm.feeVAT = data.data.result * (vm.makePayment.invoice.lbFee - vm.makePayment.invoice.paidLBFee);\r\n if(vm.makePayment.invoice.paidAmount > 0){\r\n vm.amountBooking = vm.makePayment.invoice.amount - vm.makePayment.invoice.paidAmount;\r\n }else{\r\n vm.amountBooking = vm.makePayment.invoice.amount\r\n }\r\n if (vm.makePayment.invoice.voucherId > 0) {\r\n vm.amountBooking = vm.amountBooking - vm.makePayment.invoice.voucher.value\r\n }\r\n vm.totalAmount = vm.feeVAT + vm.amountBooking;\r\n $rootScope.loading = false;\r\n },function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }\r\n\r\n function paidBooking(id) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/payment.html',\r\n controller: function ($scope,$rootScope, $uibModalInstance) {\r\n $scope.paymentForm = [];\r\n $scope.expirationYear = moment().get('year');\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n };\r\n $scope.accept = function(){\r\n if($scope.paymentForm.$valid){\r\n $rootScope.loading = true;\r\n ClientPortalService.paidBooking(id, $scope.stripeCustomer).then(function () {\r\n $rootScope.loading = false;\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }, function (error) {\r\n $rootScope.errorPayment = error.data.exceptionMessage;\r\n $rootScope.loading = false;\r\n });\r\n }\r\n }\r\n },\r\n size :'md'\r\n });\r\n }\r\n function goBackHomePage(){\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ClientHowCommunicateController', ClientHowCommunicateController);\r\n\r\n /** @ngInject */\r\n function ClientHowCommunicateController($state, $rootScope, $localStorage,CONFIG, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.profileHowCommunicateForm = [];\r\n vm.userClient = angular.copy($localStorage.userProfile);\r\n vm.updateClientUserContact = updateClientUserContact;\r\n if (!vm.userClient.communicate) {\r\n vm.userClient.communicate = {\r\n isEmailAddress: true,\r\n isSecondEmailAddress: false,\r\n isTelephoneNumber: false,\r\n isMobileNumber: false\r\n }\r\n }\r\n vm.userClientTemp = angular.copy(vm.userClient);\r\n function updateClientUserContact() {\r\n if (vm.profileHowCommunicateForm.$valid) {\r\n var resultCompare = angular.equals(vm.userClient, vm.userClientTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n ClientPortalService.updateClientUserContact(vm.userClient).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\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('lx.client')\r\n .controller('FindMeStaffController', FindMeStaffController);\r\n\r\n /** @ngInject */\r\n function FindMeStaffController($state, $localStorage, $rootScope, dataList, CONFIG,SignupClientService) {\r\n\r\n var vm = this;\r\n vm.goBackHomePage = goBackHomePage;\r\n vm.jobSearchPortalForm = {};\r\n vm.searchFilter = $localStorage.searchFilter ? angular.copy($localStorage.searchFilter) : JSON.parse(localStorage.getItem(\"Client\"));\r\n vm.timePickerDefault = CONFIG.timePickerDefault;\r\n var date = moment().toDate()\r\n vm.searchFilter.dateTimeFilters = [\r\n {\r\n startDate:date,\r\n endDate: moment(date).set('date', moment(date).date() + 7).toDate(),\r\n startTime: moment(vm.timePickerDefault.startTime),\r\n endTime: moment(vm.timePickerDefault.endTime)\r\n }\r\n ];\r\n\r\n vm.findStaff = findStaff;\r\n activate();\r\n\r\n function activate() {\r\n getTypeOfWork();\r\n getEmploymentStatuses();\r\n getKeySkills();\r\n getWorkExperiences();\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n dataList.getEmploymentStatuses().then(function (data) {\r\n vm.employmentStatuses = data.data.result.items;\r\n })\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\r\n })\r\n }\r\n\r\n function findStaff() {\r\n if(vm.jobSearchPortalForm.$valid){\r\n $localStorage.searchFilter = vm.searchFilter;\r\n $state.go(CONFIG.routes.client.portal.contactStaff);\r\n }\r\n\r\n }\r\n function goBackHomePage(){\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ContactStaffController', ContactStaffController);\r\n\r\n /** @ngInject */\r\n function ContactStaffController($state, $rootScope, $localStorage, SignupClientService, CONFIG) {\r\n var vm = this;\r\n vm.bookCandidateId = [];\r\n vm.listAdditionalCandidateId = [];\r\n vm.userClient = angular.copy($localStorage.searchFilter) || {};\r\n vm.contactCandidates = contactCandidates;\r\n vm.onCandidateChanged = onCandidateChanged;\r\n vm.goFindTheStaff = goFindTheStaff;\r\n vm.candidateType = CONFIG.candidateType.Main;\r\n function contactCandidates() {\r\n if (vm.bookCandidateId.length > 0) {\r\n $rootScope.loading = true;\r\n vm.book = {\r\n clientId: vm.userClient.id,\r\n candidateIds: vm.bookCandidateId,\r\n additionalCandidateIds: vm.listAdditionalCandidateId,\r\n dateTimeFilters: vm.userClient.dateTimeFilters,\r\n address: vm.userClient.companyProfile.address,\r\n workTypeIds: vm.userClient.workTypeIds,\r\n keySkillIds: vm.userClient.keySkillIds,\r\n employmentStatusIds: vm.userClient.employmentStatusIds,\r\n keyExperienceIds: vm.userClient.keyExperienceIds\r\n };\r\n SignupClientService.createBookings(vm.book).then(function (data) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.contactCandidates);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.errorMessage = error.data.exceptionMessage;\r\n });\r\n } else {\r\n $state.go(CONFIG.routes.client.portal.contactCandidates);\r\n }\r\n\r\n }\r\n\r\n function onCandidateChanged(cadidates, listCandidate) {\r\n var arr = [];\r\n if (cadidates.length > 0) {\r\n angular.forEach(cadidates, function (data) {\r\n if (data.candidate)\r\n arr.push(data.candidate.id)\r\n });\r\n vm.bookCandidateId = arr;\r\n vm.listAdditionalCandidateId = getlistAdditionalCandidateId(listCandidate, arr);\r\n }\r\n }\r\n\r\n function goFindTheStaff() {\r\n $state.go(CONFIG.routes.client.portal.findTheStaff)\r\n }\r\n\r\n function getlistAdditionalCandidateId(listCandidate, listselectedCandidate) {\r\n var listAdditionalCandidateId = [];\r\n angular.forEach(listCandidate, function (item) {\r\n if (isMainCandidate(item, listselectedCandidate) == false) {\r\n if (listAdditionalCandidateId.length < 7) {\r\n listAdditionalCandidateId.push(item.id);\r\n } else {\r\n return listAdditionalCandidateId;\r\n }\r\n }\r\n })\r\n return listAdditionalCandidateId;\r\n }\r\n function isMainCandidate(candidate, candidates) {\r\n var check = false;\r\n angular.forEach(candidates, function (item) {\r\n if (item == candidate.id) {\r\n return check = true;\r\n }\r\n })\r\n return check;\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ContactCandidatesController', ContactCandidatesController);\r\n\r\n /** @ngInject */\r\n function ContactCandidatesController($state,CONFIG) {\r\n\r\n var vm = this;\r\n vm.accessPortal = accessPortal;\r\n function accessPortal() {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ConfirmedBookingController', ConfirmedBookingController);\r\n\r\n /** @ngInject */\r\n function ConfirmedBookingController($state, $filter, $rootScope, CONFIG, $uibModal, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.goToMakePayment = goToMakePayment;\r\n vm.goBackHomePage = goBackHomePage;\r\n vm.onRedeemVoucher = onRedeemVoucher;\r\n var newDate = moment();\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.confirmedBooking = data.data.result;\r\n vm.confirmedBooking.startTime = moment(vm.confirmedBooking.startTime);\r\n vm.confirmedBooking.endTime = moment(vm.confirmedBooking.endTime);\r\n vm.confirmedBooking.startDate = checkCompareDate(moment(vm.confirmedBooking.startDate));\r\n vm.confirmedBooking.endDate = checkCompareDate(moment(vm.confirmedBooking.endDate));\r\n if (vm.confirmedBooking.invoice) {\r\n if (vm.confirmedBooking.invoice.paidAmount > 0) {\r\n vm.amountBooking = vm.confirmedBooking.invoice.amount - vm.confirmedBooking.invoice.paidAmount;\r\n } else {\r\n vm.amountBooking = vm.confirmedBooking.invoice.amount;\r\n }\r\n if (vm.confirmedBooking.invoice.voucherId > 0) {\r\n vm.amountBooking = vm.amountBooking - vm.confirmedBooking.invoice.voucher.value\r\n }\r\n }\r\n if (vm.confirmedBooking.potentialCandidates.length == 1) {\r\n ClientPortalService.getCandidateUserById(vm.confirmedBooking.potentialCandidates[0].candidateId).then(function (data) {\r\n vm.candidateUser = data.data.result;\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n } else {\r\n $rootScope.loading = false;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }\r\n\r\n function checkCompareDate(confirmedBooking) {\r\n if (confirmedBooking.year() < newDate.year()) return moment(newDate).toDate();\r\n if (confirmedBooking.year() == newDate.year() &&\r\n confirmedBooking.month() < newDate.month()) return moment(newDate).toDate();\r\n if (confirmedBooking.year() == newDate.year() &&\r\n confirmedBooking.month() == newDate.month() &&\r\n confirmedBooking.date() < newDate.date()) return moment(newDate).toDate();\r\n return moment(confirmedBooking).toDate();\r\n }\r\n\r\n function goToMakePayment(id) {\r\n if (vm.amountBooking < 0) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/refund.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.accept = function () {\r\n $rootScope.loading = true;\r\n ClientPortalService.paidBooking(id, {}).then(function () {\r\n $rootScope.loading = false;\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n });\r\n }\r\n\r\n },\r\n size: 'md'\r\n });\r\n } else {\r\n $state.go(CONFIG.routes.client.portal.makePayment, {id: id})\r\n }\r\n\r\n }\r\n\r\n function goBackHomePage() {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n\r\n function onRedeemVoucher() {\r\n ClientPortalService.redeemVoucherCode($state.params.id, vm.voucher).then(function (data) {\r\n vm.confirmedBooking = data.data.result;\r\n vm.confirmedBooking.startTime = moment(vm.confirmedBooking.startTime);\r\n vm.confirmedBooking.endTime = moment(vm.confirmedBooking.endTime);\r\n vm.confirmedBooking.startDate = checkCompareDate(moment(vm.confirmedBooking.startDate));\r\n vm.confirmedBooking.endDate = checkCompareDate(moment(vm.confirmedBooking.endDate));\r\n if (vm.confirmedBooking.invoice) {\r\n if (vm.confirmedBooking.invoice.paidAmount > 0) {\r\n vm.amountBooking = vm.confirmedBooking.invoice.amount - vm.confirmedBooking.invoice.paidAmount;\r\n } else {\r\n vm.amountBooking = vm.confirmedBooking.invoice.amount;\r\n }\r\n if (vm.confirmedBooking.invoice.voucherId > 0) {\r\n vm.amountBooking = vm.amountBooking - vm.confirmedBooking.invoice.voucher.value\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.errorMessage = error.data.exceptionMessage;\r\n })\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('CompanyProfileController', CompanyProfileController);\r\n\r\n /** @ngInject */\r\n function CompanyProfileController($state, $localStorage, $rootScope, CONFIG, dataList, SignupClientService, ClientPortalService, ngToast) {\r\n\r\n var vm = this;\r\n vm.userClient = angular.copy($localStorage.userProfile);\r\n vm.receivingEmailStatus = CONFIG.receivingEmailStatus;\r\n vm.userClientTemp = angular.copy(vm.userClient);\r\n vm.saveData = saveData;\r\n vm.goToHowCommunicate = goToHowCommunicate;\r\n vm.requestDeleteAccount = requestDeleteAccount;\r\n vm.updateReceivingEmailStatus = updateReceivingEmailStatus;\r\n activate();\r\n\r\n function activate() {\r\n getTypeOfWork();\r\n getEmploymentStatuses();\r\n getKeySkills();\r\n getWorkExperiences();\r\n getNatureOfBusiness();\r\n }\r\n\r\n function getNatureOfBusiness() {\r\n dataList.getBusinessTypes().then(function (data) {\r\n vm.natureOfBusiness = data.data.result.items;\r\n });\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n dataList.getEmploymentStatuses().then(function (data) {\r\n vm.employmentStatuses = data.data.result.items;\r\n })\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\r\n })\r\n }\r\n\r\n function saveData() {\r\n var resultCompare = angular.equals(vm.userClient, vm.userClientTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n vm.userClient.id = vm.userClient.id || vm.userClient.companyProfile.id;\r\n $localStorage.address = vm.userClient.companyProfile.address;\r\n SignupClientService.updateClientUserFull(vm.userClient).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $localStorage.searchFilter = data.data.result;\r\n $rootScope.loading = false;\r\n $rootScope.showNewPolicySticky = vm.userClient.isAcceptedGDPR ? false : true;\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n\r\n }\r\n\r\n function requestDeleteAccount() {\r\n $rootScope.loading = true;\r\n ClientPortalService.requestDeleteAccount().then(function () {\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n })\r\n }\r\n\r\n function goToHowCommunicate() {\r\n $state.go(CONFIG.routes.client.portal.howCommunicate);\r\n }\r\n\r\n function updateReceivingEmailStatus(status) {\r\n $rootScope.loading = true;\r\n var dataReq = {\r\n receivingEmailStatus: status,\r\n id: vm.userClient.id\r\n };\r\n ClientPortalService.receivingEmail(dataReq).then(function (res) {\r\n vm.userClient.receivingEmailStatus = res.data.result.receivingEmailStatus;\r\n $localStorage.userProfile.receivingEmailStatus = res.data.result.receivingEmailStatus;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n\r\n }, function () {\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\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('lx.client')\r\n .controller('BookingsInformationController', BookingsInformationController);\r\n\r\n /** @ngInject */\r\n function BookingsInformationController($state, $rootScope,$filter,CONFIG, CommonService,ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.loadMorePreviousBookingCount = false;\r\n vm.pagePreviousNo = 1;\r\n vm.pagePreviousSize = 10;\r\n vm.pageUpcomingNo = 1;\r\n vm.pageUpcomingSize = 10;\r\n vm.goToAmendBooking = goToAmendBooking;\r\n vm.goToReBooking = goToReBooking;\r\n vm.openProfilePopup = openProfilePopup;\r\n vm.goToConfirmBooking = goToConfirmBooking;\r\n vm.loadMorePreviousBookings = loadMorePreviousBookings;\r\n vm.loadMoreUpComingBookings = loadMoreUpComingBookings;\r\n vm.openFutureBookingPopup = openFutureBookingPopup;\r\n vm.openBookingHistoryPopup = openBookingHistoryPopup;\r\n vm.bookingStatus = bookingStatus;\r\n vm.checkDate = checkDate;\r\n vm.goBackHomePage = goBackHomePage;\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getClientPreviousBookings({\r\n PageNo: vm.pagePreviousNo,\r\n PageSize: vm.pagePreviousSize\r\n }).then(function (dataPreviousBookings) {\r\n vm.previousBookings = dataPreviousBookings.data.result.items;\r\n vm.totalPreviousBookingsCount = dataPreviousBookings.data.result.totalCount;\r\n if (vm.previousBookings.length == 0) {\r\n vm.noPreviousBookings = 'No bookings';\r\n } else if (vm.previousBookings.length < vm.totalPreviousBookingsCount) {\r\n vm.loadMorePreviousBookingCount = true;\r\n }\r\n ClientPortalService.getClientUpcomingBookings({\r\n PageNo: vm.pageUpcomingNo,\r\n PageSize: vm.pageUpcomingSize\r\n }).then(function (dataUpcomingBookings) {\r\n $rootScope.loading = false;\r\n vm.upcomingBookings = dataUpcomingBookings.data.result.items;\r\n vm.totalUpcomingBookingsCount = dataUpcomingBookings.data.result.totalCount;\r\n if (vm.upcomingBookings.length == 0) {\r\n vm.noUpcomingBookings = 'No bookings';\r\n } else if (vm.upcomingBookings.length < vm.totalUpcomingBookingsCount) {\r\n vm.loadMoreUpComingBookingCount = true;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noUpcomingBookings = 'No bookings';\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noPreviousBookings = 'No bookings';\r\n })\r\n }\r\n\r\n function goToAmendBooking(id) {\r\n $state.go(CONFIG.routes.client.portal.amendBooking, {'id': id});\r\n\r\n }\r\n\r\n function goToReBooking(id) {\r\n $state.go(CONFIG.routes.client.portal.reBooking, {'id': id});\r\n\r\n }\r\n function goBackHomePage(){\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n function goToConfirmBooking(id) {\r\n $state.go(CONFIG.routes.client.portal.confirmedBooking, {'id': id});\r\n\r\n }\r\n\r\n function openProfilePopup(profile) {\r\n ClientPortalService.openProfileModal(profile).then(function () {\r\n\r\n });\r\n }\r\n\r\n function loadMorePreviousBookings() {\r\n if (vm.loadMorePreviousBookingCount) {\r\n vm.pagePreviousNo++;\r\n $rootScope.loading = true;\r\n ClientPortalService.getClientPreviousBookings({\r\n PageNo: vm.pagePreviousNo,\r\n PageSize: vm.pagePreviousSize\r\n }).then(function (dataPreviousBookings) {\r\n $rootScope.loading = false;\r\n vm.previousBookings = vm.previousBookings.concat(dataPreviousBookings.data.result.items);\r\n vm.totalPreviousBookingsCount = dataPreviousBookings.data.result.totalCount;\r\n if (vm.previousBookings.length >= vm.totalPreviousBookingsCount) {\r\n vm.loadMorePreviousBookingCount = false;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.loadMorePreviousBookingCount = false;\r\n })\r\n }\r\n }\r\n\r\n function loadMoreUpComingBookings() {\r\n if (vm.loadMoreUpComingBookingCount) {\r\n vm.pageUpcomingNo++;\r\n $rootScope.loading = true;\r\n ClientPortalService.getClientUpcomingBookings({\r\n PageNo: vm.pageUpcomingNo,\r\n PageSize: vm.pageUpcomingSize\r\n }).then(function (dataUpcomingBookings) {\r\n $rootScope.loading = false;\r\n vm.upcomingBookings = vm.upcomingBookings.concat(dataUpcomingBookings.data.result.items);\r\n vm.totalUpcomingBookingsCount = dataUpcomingBookings.data.result.totalCount;\r\n if (vm.upcomingBookings.length >= vm.totalUpcomingBookingsCount) {\r\n vm.loadMoreUpComingBookingCount = false;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.loadMoreUpComingBookingCount = false;\r\n })\r\n }\r\n }\r\n\r\n function openFutureBookingPopup(booking) {\r\n ClientPortalService.openFutureBookingModal(booking).then(function () {\r\n\r\n });\r\n }\r\n\r\n function openBookingHistoryPopup(booking) {\r\n ClientPortalService.openBookingHistoryModal(booking).then(function () {\r\n\r\n });\r\n }\r\n\r\n function bookingStatus(status){\r\n var item = $filter('filter')(CONFIG.bookingStatus, status);\r\n return item[0].status;\r\n }\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('AmendBookingController', AmendBookingController);\r\n\r\n /** @ngInject */\r\n function AmendBookingController($state, $rootScope, $scope, $filter, $uibModal, CONFIG, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.amendBooking = {};\r\n vm.goToConfirmedBooking = goToConfirmedBooking;\r\n vm.openCancelToolTipModal = openCancelToolTipModal;\r\n vm.calculatorAmount = calculatorAmount;\r\n vm.goBackHomePage = goBackHomePage;\r\n var newDate = moment();\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n ClientPortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.originAmendBooking = angular.copy(data.data.result);\r\n vm.amendBooking = data.data.result;\r\n vm.amendBooking.startTime = angular.copy(moment(vm.amendBooking.startTime));\r\n vm.amendBooking.endTime = angular.copy(moment(vm.amendBooking.endTime));\r\n vm.amendBooking.startDate = checkCompareDate(moment(vm.amendBooking.startDate));\r\n vm.amendBooking.endDate = checkCompareDate(moment(vm.amendBooking.endDate));\r\n if (vm.amendBooking.invoice) {\r\n if (vm.amendBooking.invoice.paidAmount > 0) {\r\n vm.amountBooking = vm.amendBooking.invoice.amount - vm.amendBooking.invoice.paidAmount\r\n } else {\r\n vm.amountBooking = vm.amendBooking.invoice.amount\r\n }\r\n if (vm.amendBooking.invoice.voucherId > 0) {\r\n vm.amountBooking = vm.amountBooking - vm.amendBooking.invoice.voucher.value\r\n }\r\n }\r\n if (vm.amendBooking.doerId != null) {\r\n ClientPortalService.getCandidateUserById(vm.amendBooking.doerId).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.candidateUser = data.data.result;\r\n }, function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n } else {\r\n $rootScope.loading = false;\r\n }\r\n return vm.amendBooking;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }\r\n function checkCompareDate(amendBookingDate) {\r\n if (amendBookingDate.year() < newDate.year()) return moment(newDate).toDate();\r\n if (amendBookingDate.year() == newDate.year() &&\r\n amendBookingDate.month() < newDate.month()) return moment(newDate).toDate();\r\n if (amendBookingDate.year() == newDate.year() &&\r\n amendBookingDate.month() == newDate.month() &&\r\n amendBookingDate.date() < newDate.date()) return moment(newDate).toDate();\r\n return moment(amendBookingDate).toDate();\r\n }\r\n function goToConfirmedBooking(id) {\r\n var data = {\r\n clientId: vm.amendBooking.clientId,\r\n startTime: moment(vm.amendBooking.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(vm.amendBooking.endTime).format(CONFIG.timeFormat),\r\n startDate: moment(vm.amendBooking.startDate).format(CONFIG.dateFormat),\r\n endDate: moment(vm.amendBooking.endDate).format(CONFIG.dateFormat)\r\n };\r\n if (!moment(data.startDate).isSame(vm.originAmendBooking.startDate) ||\r\n !moment(data.endDate).isSame(vm.originAmendBooking.endDate) ||\r\n !moment(data.startTime).isSame(vm.originAmendBooking.startTime) ||\r\n !moment(data.endTime).isSame(vm.originAmendBooking.endTime)) {\r\n $rootScope.loading = true;\r\n ClientPortalService.amentBooking(id, data).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n });\r\n } else {\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n }\r\n }\r\n\r\n function openCancelToolTipModal(booking) {\r\n ClientPortalService.openCancelBookingConfirmModal(booking)\r\n }\r\n\r\n function calculatorAmount() {\r\n var data = {\r\n startTime: moment(vm.amendBooking.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(vm.amendBooking.endTime).format(CONFIG.timeFormat),\r\n startDate: moment(vm.amendBooking.startDate).format(CONFIG.dateFormat),\r\n endDate: moment(vm.amendBooking.endDate).format(CONFIG.dateFormat)\r\n };\r\n $rootScope.loading = true;\r\n ClientPortalService.calculatorAmount($state.params.id, data).then(function (data) {\r\n if (vm.amendBooking.invoice) {\r\n vm.amendBooking.invoice.amount = data.data.result\r\n if (vm.amendBooking.invoice.paidAmount > 0) {\r\n vm.amountBooking = vm.amendBooking.invoice.amount - vm.amendBooking.invoice.paidAmount;\r\n }\r\n if (vm.amendBooking.invoice.voucherId > 0) {\r\n vm.amountBooking = vm.amountBooking - vm.amendBooking.invoice.voucher.value\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function goBackHomePage() {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n $scope.$watchGroup(['vm.amendBooking.startTime', 'vm.amendBooking.endTime', 'vm.amendBooking.startDate', 'vm.amendBooking.endDate'],\r\n function (newValues, oldValues) {\r\n if (oldValues[0] && oldValues[1] && oldValues[2] && oldValues[3] && vm.candidateUser)\r\n calculatorAmount();\r\n }\r\n )\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate', []);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpUploadDeliveryDriverDocumentController', SignUpUploadDeliveryDriverDocumentController);\r\n\r\n /** @ngInject */\r\n function SignUpUploadDeliveryDriverDocumentController(SignupCandidateService, $state, $localStorage, $timeout, $rootScope, Upload, CONFIG, ngToast) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n if ($localStorage.userProfile) {\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n }\r\n vm.updateProofOfAddress = updateProofOfAddress;\r\n vm.updateVehicle = updateVehicle;\r\n vm.selectProofOfAddressImage = selectProofOfAddressImage;\r\n vm.selectVehicleImage = selectVehicleImage;\r\n vm.removeProofOfAddressFiles = removeProofOfAddressFiles;\r\n vm.removeVehicleFiles = removeVehicleFiles;\r\n vm.goUploadDBSCertificatePage = goUploadDBSCertificatePage;\r\n active();\r\n function active() {\r\n }\r\n\r\n\r\n function updateProofOfAddress() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyProofOfAddress) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyProofOfAddress\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.proofOfAddressUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function updateVehicle() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyOfVehicle) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyOfVehicle\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.vehicleUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectProofOfAddressImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasProofOfAddressImage = true;\r\n vm.fileProofOfAddressUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function selectVehicleImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasVehicleImage = true;\r\n vm.fileVehicleUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeProofOfAddressFiles() {\r\n if (vm.userCandidate.deliveryDriver.proofOfAddressUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeProofOfAddress(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.proofOfAddressUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileProofOfAddressUrl) {\r\n vm.fileProofOfAddressUrl = null;\r\n }\r\n if (vm.isHasProofOfAddressImage) {\r\n vm.isHasProofOfAddressImage = false\r\n }\r\n }\r\n\r\n function removeVehicleFiles() {\r\n if (vm.userCandidate.deliveryDriver.vehicleUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeVehicle(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.vehicleUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileVehicleUrl) {\r\n vm.fileVehicleUrl = null;\r\n }\r\n if (vm.isHasVehicleImage) {\r\n vm.isHasVehicleImage = false\r\n }\r\n }\r\n\r\n vm.goUploadDBSCertificatePage = goUploadDBSCertificatePage;\r\n function goUploadDBSCertificatePage() {\r\n $state.go(CONFIG.routes.candidate.signup.uploadDBSCertificate);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpUploadDBSCertificateController', SignUpUploadDBSCertificateController);\r\n\r\n /** @ngInject */\r\n function SignUpUploadDBSCertificateController(SignupCandidateService, Upload, ngToast, $state, $timeout, CONFIG, $localStorage, $scope, $rootScope) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n if ($localStorage.userProfile) {\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n }\r\n vm.updateDBSCertificate = updateDBSCertificate;\r\n vm.selectDBSCertificateImage = selectDBSCertificateImage;\r\n vm.removeDBSCertificateFiles = removeDBSCertificateFiles;\r\n vm.updateDeliveryDriver = updateDeliveryDriver;\r\n active();\r\n function active() {\r\n }\r\n\r\n\r\n function updateDBSCertificate() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyDBSCertificate) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyDBSCertificate\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.dbsCertificateUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectDBSCertificateImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasDBSCertificateImage = true;\r\n vm.fileDBSCertificateUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeDBSCertificateFiles() {\r\n if (vm.userCandidate.deliveryDriver.dbsCertificateUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeDBSCertificate(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.dbsCertificateUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileDBSCertificateUrl) {\r\n vm.fileDBSCertificateUrl = null;\r\n }\r\n if (vm.isHasDBSCertificateImage) {\r\n vm.isHasDBSCertificateImage = false\r\n }\r\n }\r\n\r\n function updateDeliveryDriver() {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n $state.go(CONFIG.routes.candidate.signup.insuranceCode);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n else {\r\n $state.go(CONFIG.routes.candidate.signup.insuranceCode);\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('lx.candidate')\r\n .controller('SignUpStep9Controller', SignUpStep9Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep9Controller($state,$uibModal,CONFIG, $rootScope,$localStorage,CandidatePortalService, ngToast) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.goToPortal = goToPortal;\r\n vm.sendCandidateConfirmEmailViaPhoneNumber = sendCandidateConfirmEmailViaPhoneNumber;\r\n vm.receivedEmail = receivedEmail;\r\n function goToPortal() {\r\n if (vm.userCandidate.isEmailConfirmed){\r\n $localStorage.isSignup = false;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\r\n }\r\n function sendCandidateConfirmEmailViaPhoneNumber(){\r\n $rootScope.loading = true;\r\n CandidatePortalService.sendCandidateConfirmEmailViaPhoneNumber(vm.userCandidate.id).then(function(){\r\n $rootScope.loading = false;\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/common/confirmEmail.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.login);\r\n }\r\n },\r\n size :'md'\r\n });\r\n },function(error){\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function receivedEmail(){\r\n $rootScope.loading = true;\r\n CandidatePortalService.sendCandidateConfirmEmail(vm.userCandidate.id).then(function(){\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $uibModal.open({\r\n templateUrl: 'app/components/common/receivedEmail.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n $state.go(CONFIG.routes.login);\r\n };\r\n $scope.noSendEmail=function(){\r\n $rootScope.loading = true;\r\n CandidatePortalService.sendCandidateConfirmEmail(vm.userCandidate.id).then(function(){\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n };\r\n },\r\n size :'md'\r\n });\r\n },function(){\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\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('lx.candidate')\r\n .controller('SignUpStep8Controller', SignUpStep8Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep8Controller($state, $rootScope,CONFIG, $localStorage, SignupCandidateService) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.profileForm8 = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidate.profile.isSupportedFromCommunity = true;\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.back = back;\r\n vm.onCreateUserBillingInfo = onCreateUserBillingInfo;\r\n vm.onSupportForSelfEmployed = onSupportForSelfEmployed;\r\n function onCreateUserBillingInfo() {\r\n $state.go(CONFIG.routes.candidate.signup.step9)\r\n }\r\n function onSupportForSelfEmployed() {\r\n $rootScope.loading = true;\r\n SignupCandidateService.supportForSelfEmployed(vm.userCandidate.id, vm.userCandidate).then(function(res){\r\n $localStorage.userProfile.profile.isMemberOfCommunity = res.data.result.profile.isMemberOfCommunity;\r\n $rootScope.loading = false;\r\n if(res.data.result.isDeliveryDriver){\r\n $state.go(CONFIG.routes.candidate.signup.modeOfTransport);\r\n }else{\r\n $state.go(CONFIG.routes.candidate.signup.step9);\r\n }\r\n },function(){\r\n $rootScope.loading = false;\r\n });\r\n }\r\n\r\n function back() {\r\n $state.go(CONFIG.routes.candidate.signup.step7)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpStep7Controller', SignUpStep7Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep7Controller($state, $scope, $rootScope, $localStorage,\r\n CONFIG, SignupCandidateService, Upload, ngToast, $timeout) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.profileForm7 = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n if ($localStorage.userProfile) {\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n }\r\n vm.croppedPassportDataUrl = null;\r\n vm.updateUserContact = updateUserContact;\r\n vm.updateUserPassport = updateUserPassport;\r\n vm.backProfileCandidate = backProfileCandidate;\r\n vm.selectImageLast = selectImageLast;\r\n vm.selectImage = selectImage;\r\n vm.alternativeDocumentation = alternativeDocumentation;\r\n vm.removePassportFiles = removePassportFiles;\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n if (vm.userCandidate.profile.passportUrl !== null) {\r\n vm.pdfFileCurrent = vm.userCandidate.profile.passportUrl;\r\n vm.pdfFileCurrent = vm.pdfFileCurrent.split(\".\").pop();\r\n }\r\n active();\r\n function active() {\r\n checkOriginalContactUser();\r\n }\r\n\r\n function checkOriginalContactUser() {\r\n if ($localStorage.userProfile) {\r\n vm.originalProfile = angular.copy(vm.userCandidate.profile)\r\n }\r\n }\r\n\r\n\r\n function updateUserPassport() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyOfPassport) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyOfPassport\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.profile.passportUrl = response.data[0].url;\r\n SignupCandidateService.updateUserPassport(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n if (data.data.result.profile.passportUrl !== null) {\r\n vm.documentFile = data.data.result.profile.passportUrl;\r\n vm.documentFile = vm.documentFile.split(\".\").pop().toLowerCase();\r\n if (vm.documentFile !== \"png\" && vm.documentFile !== \"jpg\" && vm.documentPhotoFile !== \"gif\" && vm.documentFile !== \"jpeg\" && vm.documentFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function updateUserContact() {\r\n $state.go(CONFIG.routes.candidate.signup.step8);\r\n }\r\n\r\n function backProfileCandidate() {\r\n $state.go(CONFIG.routes.candidate.signup.step6);\r\n }\r\n\r\n function selectImageLast($files) {\r\n vm.pdfFileName = vm.copyOfPassport.name;\r\n vm.photoFile = vm.copyOfPassport.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop().toLowerCase();\r\n if (vm.photoFile == \"pdf\") {\r\n vm.showImgFile = false;\r\n vm.showPdfFile = true;\r\n } else {\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n }\r\n if (vm.photoFile !== \"png\" && vm.photoFile !== \"jpg\" && vm.photoFile !== \"jpeg\" && vm.photoFile !== \"gif\" && vm.photoFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasLastImage = true;\r\n vm.filePhotoUrl = imgSrc;\r\n $timeout(function () {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function selectImage($files) {\r\n vm.pdfFileName = vm.copyOfPassport.name;\r\n vm.photoFile = vm.copyOfPassport.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile == \"pdf\") {\r\n vm.showImgFile = false;\r\n vm.showPdfFile = true;\r\n } else {\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n }\r\n if ($files.length > 0) {\r\n vm.file = $files[0];\r\n if (vm.file) {\r\n var imgSrc = URL.createObjectURL(vm.file);\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasImage = false;\r\n vm.fileUrl = imgSrc;\r\n $timeout(function () {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function removePassportFiles() {\r\n if (vm.userCandidate.profile.passportUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeUserPassport(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.profile.passportUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n vm.email2Message = error.data.error.message;\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.filePhotoUrl) {\r\n vm.filePhotoUrl = null;\r\n }\r\n if (vm.isHasLastImage) {\r\n vm.isHasLastImage = false\r\n }\r\n }\r\n\r\n function alternativeDocumentation() {\r\n $state.go(CONFIG.routes.candidate.signup.alternativeDocumentation);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpStep6Controller', SignUpStep6Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep6Controller($state, CONFIG,$localStorage) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1)\r\n return;\r\n }\r\n var vm = this;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.backUpdateProfile = backUpdateProfile;\r\n vm.goUpdatePassort = goUpdatePassort;\r\n vm.goProfileInformation = goProfileInformation;\r\n vm.goProfileAvailability = goProfileAvailability;\r\n vm.goProfileUpload = goProfileUpload;\r\n function backUpdateProfile() {\r\n $state.go(CONFIG.routes.candidate.signup.step5);\r\n }\r\n\r\n function goUpdatePassort() {\r\n $state.go(CONFIG.routes.candidate.signup.step7);\r\n }\r\n\r\n function goProfileInformation() {\r\n $state.go(CONFIG.routes.candidate.portal.profileInformation, {type: 'signup'});\r\n }\r\n\r\n function goProfileAvailability() {\r\n $state.go(CONFIG.routes.candidate.portal.availability, {type: 'signup'});\r\n }\r\n\r\n function goProfileUpload() {\r\n $state.go(CONFIG.routes.candidate.portal.uploadPhoto, {type: 'signup'});\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpStep5Controller', SignUpStep5Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep5Controller($state, $scope, $uibModal, $localStorage, CONFIG, $rootScope,\r\n Upload, $sce, SignupCandidateService, ngToast, $timeout) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.file = null;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n vm.isImage = false;\r\n vm.isVideo = false;\r\n vm.isHasVideo = false;\r\n vm.text = $sce.trustAsHtml('
The workface video is a sixty second video where you get a chance to briefly explain about your requirements and sell your skills. Production values of the video are not important as it is what you say and how you say it.
Below is a step by step guide on how create and upload the perfect video using your smart phone. If this seems a bit too scary at this stage you can just upload a photo or move on to the next page.
');\r\n vm.resultImage = null;\r\n vm.isHasImage = false;\r\n vm.uploadFiles = uploadFiles;\r\n vm.openVideoToolTipModal = openVideoToolTipModal;\r\n vm.selectFile = selectFile;\r\n vm.backUpdateCandidateProfile = backUpdateCandidateProfile;\r\n vm.removeFiles = removeFiles;\r\n vm.getApiFunction = getApiFunction;\r\n vm.cropImageApi = null;\r\n vm.myButtonLabels = CONFIG.buttonLabels;\r\n vm.isPlay = true;\r\n vm.play = play;\r\n vm.goNextStep = goNextStep;\r\n vm.onUpdateVideoOrPhoto = onUpdateVideoOrPhoto;\r\n vm.checkTypeFile = checkTypeFile;\r\n active();\r\n function active() {\r\n checkHasPhotoOrVideo();\r\n }\r\n\r\n\r\n function checkHasPhotoOrVideo() {\r\n if (vm.userCandidate.profile.photoUrl && !vm.userCandidate.profile.videoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasPhoto = true;\r\n } else {\r\n vm.isHasPhoto = false;\r\n }\r\n if (vm.userCandidate.profile.videoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasVideo = true;\r\n } else {\r\n vm.isHasVideo = false;\r\n }\r\n if (vm.userCandidate.profile.photoUrl !== null && vm.userCandidate.profile.videoUrl !== null) {\r\n vm.documentPhotoFile = vm.userCandidate.profile.photoUrl;\r\n vm.documentPhotoFile = vm.documentPhotoFile.split(\".\").pop();\r\n vm.documentVideoFile = vm.userCandidate.profile.videoUrl;\r\n vm.documentVideoFile = vm.documentVideoFile.split(\".\").pop();\r\n if (vm.documentPhotoFile !== \"png\" && vm.documentPhotoFile !== \"jpg\" && vm.documentPhotoFile !== \"jpeg\" && vm.documentPhotoFile !== \"gif\" && vm.documentVideoFile !== \"mp4\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, GIF, JPEG and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n }\r\n\r\n function uploadFiles() {\r\n if (vm.cropImageApi) {\r\n vm.resultImage = vm.cropImageApi.crop();\r\n }\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.files) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.isVideo ? vm.files : Upload.dataUrltoBlob(vm.resultImage, vm.files.name)\r\n }\r\n }).then(function (response) {\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile === 1) {\r\n vm.isImage = false;\r\n vm.isHasImage = true;\r\n vm.userCandidate.profile.photoUrl = '';\r\n vm.userCandidate.profile.videoType = null;\r\n vm.userCandidate.profile.photoUrl = response.data[0].url;\r\n onUpdateVideoOrPhoto();\r\n }\r\n if (typeFile === 2) {\r\n vm.userCandidate.profile.videoUrl = '';\r\n vm.userCandidate.profile.videoType = response.data[0].fileType;\r\n vm.userCandidate.profile.videoUrl = response.data[0].url;\r\n vm.userCandidate.profile.photoUrl = response.data[0].url_Thumbnail;\r\n vm.isHasVideo = true;\r\n $rootScope.loading = false;\r\n }\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n vm.isHasVideo = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n });\r\n }\r\n }\r\n\r\n function selectFile($files) {\r\n if (vm.files.name !== null) {\r\n vm.photoFile = vm.files.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile !== \"png\" && vm.photoFile !== \"jpg\" && vm.photoFile !== \"jpeg\" && vm.photoFile !== \"gif\" && vm.photoFile !== \"mp4\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and MP4 files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n if ($files.length > 0) {\r\n vm.file = $files[0];\r\n var type = checkTypeFile(vm.file.type);\r\n $timeout(function () {\r\n if (vm.file) {\r\n var imgSrc = URL.createObjectURL(vm.file);\r\n if (type == 1) {\r\n vm.isImage = true;\r\n vm.userCandidate.profile.videoType = null;\r\n if (vm.userCandidate.profile.videoUrl) {\r\n vm.userCandidate.profile.videoUrl = null;\r\n }\r\n }\r\n if (type == 2) {\r\n if (vm.file.size >= 50000000) {\r\n vm.fileOnlyUpload = \"Sorry! LB X-Change is supporting file under 50mb\";\r\n return;\r\n }\r\n vm.isVideo = true;\r\n vm.isPlay = true;\r\n vm.userCandidate.profile.videoType = vm.file.type;\r\n if (vm.userCandidate.profile.photoUrl) {\r\n vm.userCandidate.profile.photoUrl = null;\r\n }\r\n uploadFiles();\r\n }\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasImage = false;\r\n vm.fileUrl = imgSrc;\r\n $files = [];\r\n }\r\n }\r\n }, 0);\r\n }\r\n }\r\n\r\n function getApiFunction(api) {\r\n vm.cropImageApi = api;\r\n }\r\n\r\n function checkNameFile(filename) {\r\n var n = filename.split(\".\");\r\n return n[n.length - 1];\r\n\r\n }\r\n\r\n function checkTypeFile(filename) {\r\n var ext = filename.split(\"/\");\r\n if (ext[0].toLowerCase() == \"image\") {\r\n return 1\r\n }\r\n if (ext[0].toLowerCase() == \"video\") {\r\n return 2\r\n }\r\n return\r\n }\r\n\r\n\r\n function onUpdateVideoOrPhoto() {\r\n vm.userCandidate.id = vm.userCandidate.id || vm.userCandidate.profile.id;\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile == 1) {\r\n SignupCandidateService.updateUserPhoto(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n } else if (typeFile == 2) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateUserVideo(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n function goNextStep() {\r\n $state.go(CONFIG.routes.candidate.signup.step6);\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.userCandidate.profile.photoUrl || vm.userCandidate.profile.videoUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeUserPhotoAndVideo(vm.userCandidate.id).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n vm.userCandidate.profile.photoUrl = null;\r\n vm.userCandidate.profile.videoUrl = null;\r\n vm.userCandidate.profile.videoType = vm.file.type;\r\n checkHasPhotoOrVideo();\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n vm.isHasImage = false;\r\n\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.files) {\r\n vm.files = null;\r\n }\r\n if (vm.isImage) {\r\n vm.isImage = false\r\n }\r\n if (vm.isHasVideo) {\r\n vm.isHasVideo = false\r\n }\r\n\r\n }\r\n\r\n function openVideoToolTipModal(index) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/signup/partials/addvideo-tooltip-modal.html',\r\n controller: function ($scope, $uibModalInstance, index) {\r\n $scope.index = index;\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n\r\n },\r\n resolve: {\r\n index: index\r\n },\r\n size: 'md'\r\n });\r\n }\r\n\r\n\r\n function backUpdateCandidateProfile() {\r\n $state.go(CONFIG.routes.candidate.signup.step4)\r\n }\r\n\r\n function play(e) {\r\n if (!vm.userCandidate.profile.videoType) return;\r\n var elem = angular.element(e.currentTarget).parent().find('video');\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n elem.muted = \"muted\";\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeOut()\r\n elem.on('ended', function () {\r\n\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n }\r\n })\r\n } else {\r\n elem[0].pause();\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeIn()\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('lx.candidate')\r\n .controller('SignUpStep4Controller', SignUpStep4Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep4Controller($state,CONFIG, dataList, $localStorage, User, Auth, $rootScope, SignupCandidateService) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.profileForm4 = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidate.profile.minHourlyRate = CONFIG.minHourlyRate;\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.onUpdateCandidate = onUpdateCandidate;\r\n vm.backUpdateCandidate = backUpdateCandidate;\r\n vm.considerPermanentRoleOptions = CONFIG.considerPermanentRole;\r\n activate();\r\n\r\n function activate() {\r\n getTypeOfWork();\r\n getEmploymentStatuses();\r\n getKeySkills();\r\n getWorkExperiences();\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n dataList.getEmploymentStatuses().then(function (data) {\r\n vm.employmentStatuses = data.data.result.items;\r\n })\r\n }\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\r\n })\r\n }\r\n\r\n function backUpdateCandidate() {\r\n $state.go(CONFIG.routes.candidate.signup.step3)\r\n }\r\n\r\n function onUpdateCandidate() {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (vm.profileForm4.$valid) {\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n SignupCandidateService.updateCandidate(vm.userCandidate).then(function (data) {\r\n User.get().$promise.then(function (resp) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = resp.result.user;\r\n $localStorage.searchFilter = resp.result.user;\r\n $state.go(CONFIG.routes.candidate.signup.step5)\r\n });\r\n\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.candidate.signup.step5)\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('lx.candidate')\r\n .controller('SignUpStep3Controller', SignUpStep3Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep3Controller(CONFIG, $state, Auth, User, UserRoleService, $localStorage, $rootScope, SignupCandidateService) {\r\n var vm = this;\r\n vm.profileForm3 = [];\r\n vm.userCandidate = $localStorage.userProfile ? angular.copy($localStorage.userProfile) : JSON.parse(localStorage.getItem(\"Candidate\"));\r\n if (vm.userCandidate) {\r\n vm.userCandidate.isAcceptedGDPR = true;\r\n vm.userCandidate.profile.dateOfBirth = vm.userCandidate.profile.dateOfBirth ? new Date(vm.userCandidate.profile.dateOfBirth) : null;\r\n if (vm.userCandidate.workTypeIds == undefined || vm.userCandidate.workTypeIds.length <= 0) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n } else {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.dateOptions = {\r\n maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate())\r\n };\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.candidateRole = {};\r\n vm.checkBOD = false;\r\n vm.checkBODOverLimit = false;\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.resetCheckBOD = resetCheckBOD;\r\n //functions\r\n vm.onCreateOrUpdateCandidate = onCreateOrUpdateCandidate;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.clearError = clearError;\r\n vm.backRatingPage = backRatingPage;\r\n vm.checkBODDate = checkBODDate;\r\n activate();\r\n\r\n function activate() {\r\n getCandidateRole();\r\n }\r\n\r\n function onCreateOrUpdateCandidate() {\r\n if (vm.profileForm3.$valid && !vm.checkBODOverLimit) {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n vm.userCandidate.roleId = vm.candidateRole.id;\r\n vm.userCandidate.isActive = true;\r\n vm.userCandidate.id = vm.userCandidate.id || '';\r\n $localStorage.address = vm.userCandidate.profile.address;\r\n if (!vm.userCandidate.id) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.createCandidate(vm.userCandidate).then(function (data) {\r\n var user = {\r\n userNameOrEmailAddress: vm.userCandidate.emailAddress,\r\n password: vm.userCandidate.password\r\n };\r\n $localStorage.userProfile = data.data;\r\n Auth.loginWithoutConfirm(user).then(function () {\r\n $rootScope.loading = false;\r\n localStorage.removeItem(\"Candidate\");\r\n $localStorage.isSignup = true;\r\n $state.go(CONFIG.routes.candidate.signup.step4)\r\n }, function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.login)\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n });\r\n } else {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateCandidateUserProfile(vm.userCandidate).then(function (data) {\r\n User.get().$promise.then(function (resp) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = resp.result.user;\r\n $localStorage.searchFilter = resp.result.user;\r\n localStorage.removeItem(\"Candidate\");\r\n $state.go(CONFIG.routes.candidate.signup.step4)\r\n });\r\n\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n } else {\r\n $state.go(CONFIG.routes.candidate.signup.step4);\r\n }\r\n\r\n }\r\n }\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n\r\n function getCandidateRole() {\r\n UserRoleService.getRoleByName(CONFIG.userRoles.candidate).then(function (data) {\r\n vm.candidateRole = data.data.result;\r\n })\r\n }\r\n\r\n function clearError() {\r\n if (vm.emailMessage) {\r\n vm.emailMessage = false;\r\n }\r\n }\r\n\r\n function backRatingPage() {\r\n $state.go(CONFIG.routes.candidate.signup.step2)\r\n }\r\n\r\n function checkBODDate(BODDate) {\r\n vm.checkBOD = true;\r\n if (BODDate && BODDate.getTime() > vm.dateOptions.maxDate.getTime()) {\r\n vm.checkBODOverLimit = true;\r\n } else {\r\n vm.checkBODOverLimit = false;\r\n }\r\n\r\n }\r\n\r\n function resetCheckBOD() {\r\n vm.checkBOD = false;\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpStep2Controller', SignUpStep2Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep2Controller($state,CONFIG, SignupCandidateService, $rootScope) {\r\n\r\n var vm = this;\r\n vm.filterClient = JSON.parse(localStorage.getItem(\"Candidate\")) || {};\r\n vm.clientLength = null;\r\n vm.goCreateCandidate = goCreateCandidate;\n vm.loading = false;\n\r\n getNearClient();\n\r\n function getNearClient() {\r\n $rootScope.loading = true;\n vm.loading = $rootScope.loading;\r\n if (angular.equals({}, vm.filterClient)) {\r\n $rootScope.loading = false;\n vm.loading = $rootScope.loading;\r\n $state.go(CONFIG.routes.candidate.signup.step1)\r\n } else {\r\n SignupCandidateService.getNearClient(vm.filterClient).then(function (data) {\r\n vm.clientLength = data.data.result.totalCount;\r\n $rootScope.loading = false;\n vm.loading = $rootScope.loading;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n }\r\n\r\n function goCreateCandidate() {\r\n $state.go(CONFIG.routes.candidate.signup.step3)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpStep1Controller', SignUpStep1Controller);\r\n\r\n /** @ngInject */\r\n function SignUpStep1Controller(dataList, CONFIG,CommonService,$state, $localStorage) {\r\n\r\n var vm = this;\r\n vm.profileForm1 = [];\r\n vm.userCandidate = $localStorage.userProfile ? angular.copy($localStorage.userProfile) : {};\r\n\r\n vm.userCandidate.availableDayTimes = !vm.userCandidate.id ? [] : vm.userCandidate.availableDayTimes;\r\n vm.timePickerOptions = CONFIG.timePickerOptions;\r\n vm.dateOptions = CONFIG.dateOptions;\r\n vm.availableTemp = [];\r\n\r\n vm.timePickerDefault = CONFIG.timePickerDefault;\r\n vm.availableDayTimes =\r\n [\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(1),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(1),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(2),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(2),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(3),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(3),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(4),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(4),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(5),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(5),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(6),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(6),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(7),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(7),\r\n isSelected: false\r\n }\r\n ];\r\n\r\n //Functions\r\n vm.findWorkYouWant = findWorkYouWant;\r\n vm.getDayWeek = getDayWeek;\r\n vm.selectDayOfWeek = selectDayOfWeek;\r\n\r\n vm.onChangeTimeTo = onChangeTimeTo;\r\n vm.onChangeTimeFrom = onChangeTimeFrom;\r\n\r\n function checkDate() {\r\n if (vm.userCandidate.availableDayTimes.length > 0) {\r\n angular.forEach(vm.userCandidate.availableDayTimes, function (userDate) {\r\n var dayOfWeek = moment(userDate.startTime).isoWeekday();\r\n vm.availableDayTimes[dayOfWeek - 1] = {\r\n startTime: moment(userDate.startTime),\r\n endTime: moment(userDate.endTime),\r\n isSelected: true\r\n };\r\n });\r\n }\r\n }\r\n\r\n function getDayWeek(d) {\r\n return CommonService.getDateOfWeek(d)\r\n }\r\n\r\n function selectDayOfWeek(num, check, date) {\r\n var d = moment(vm.timePickerDefault.startTime),\r\n day = moment(d).day();\r\n if (check == true) {\r\n var diff = moment(d).date() - day + num + 1,\r\n current = moment(d).date()\r\n day = {\r\n startTime: null,\r\n endTime: null,\r\n isSelected: false\r\n };\r\n if (diff < current) {\r\n day = {\r\n startTime: moment(d).set('date' , diff + 7),\r\n endTime: moment(d).set('date' , diff + 7),\r\n isSelected: true\r\n };\r\n } else {\r\n day = {\r\n startTime: moment(d).set('date' , diff),\r\n endTime: moment(d).set('date' , diff),\r\n isSelected: true\r\n };\r\n }\r\n vm.availableTemp.push(day)\r\n\r\n } else {\r\n var index = arrayObjectIndexOf(vm.availableTemp, date);\r\n vm.availableTemp.splice(index, 1)\r\n\r\n }\r\n }\r\n\r\n function arrayObjectIndexOf(myArray, searchTerm) {\r\n for (var i = 0, len = myArray.length; i < len; i++) {\r\n if (angular.equals(myArray[i].startTime, searchTerm.startTime)) return i;\r\n }\r\n return -1;\r\n }\r\n\r\n function onChangeTimeTo(available) {\r\n if (available.startTime >= available.endTime) {\r\n var endTime = moment(available.endTime);\r\n available.startTime = endTime.minute(endTime.minute() - 15);\r\n }\r\n }\r\n\r\n function onChangeTimeFrom(available) {\r\n if (available.startTime >= available.endTime) {\r\n var startTime = moment(available.startTime);\r\n available.endTime = startTime.minute(startTime.minute() + 15);\r\n }\r\n }\r\n\r\n function findWorkYouWant() {\r\n if (vm.profileForm1.$valid) {\r\n vm.userCandidate.availableDayTimes = [];\r\n angular.forEach(vm.availableDayTimes, function (check) {\r\n if (check.isSelected) {\r\n vm.userCandidate.availableDayTimes.push(\r\n {\r\n startTime: moment(check.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(check.endTime).format(CONFIG.timeFormat)\r\n }\r\n );\r\n }\r\n });\r\n localStorage.setItem('Candidate', JSON.stringify(vm.userCandidate));\r\n $state.go(CONFIG.routes.candidate.signup.step2)\r\n }\r\n\r\n }\r\n\r\n\r\n activate();\r\n function activate() {\r\n getTypeOfWork();\r\n checkDate();\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpModeOfTransportController', SignUpModeOfTransportController);\r\n\r\n /** @ngInject */\r\n function SignUpModeOfTransportController(dataList, SignupCandidateService, $state, $window, CONFIG, $localStorage, $rootScope) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.transportationModes = [];\r\n vm.updateDeliveryDriver = updateDeliveryDriver;\r\n activate();\r\n\r\n function activate() {\r\n getTransportationModes();\r\n }\r\n\r\n function getTransportationModes() {\r\n dataList.getTransportationModes().then(function (data) {\r\n vm.transportationModes = data.data.result.items;\r\n })\r\n }\r\n function updateDeliveryDriver() {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateDeliveryDriver(vm.user).then(function(res){\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = res.data.result;\r\n $state.go(CONFIG.routes.candidate.signup.uploadDeliveryDriverDocument);\r\n },function(){\r\n $rootScope.loading = 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\r\n .module('lx.candidate')\r\n .controller('SignUpInsuranceCodeController', SignUpInsuranceCodeController);\r\n\r\n /** @ngInject */\r\n function SignUpInsuranceCodeController(SignupCandidateService, $rootScope, $timeout, Upload, ngToast, $state, $window, CONFIG, $localStorage) {\r\n\r\n var vm = this;\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.updateInsuranceCode = updateInsuranceCode;\r\n vm.selectInsuranceCodeImage = selectInsuranceCodeImage;\r\n vm.removeInsuranceCodeFiles = removeInsuranceCodeFiles;\r\n vm.goStep9 = goStep9;\r\n function updateInsuranceCode() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyInsuranceCode) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyInsuranceCode\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.insuranceCode = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectInsuranceCodeImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasInsuranceCodeImage = true;\r\n vm.fileInsuranceCodeUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeInsuranceCodeFiles() {\r\n if (vm.userCandidate.deliveryDriver.insuranceCode) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeInsuranceCode(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.insuranceCode = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileInsuranceCodeUrl) {\r\n vm.fileInsuranceCodeUrl = null;\r\n }\r\n if (vm.isHasInsuranceCodeImage) {\r\n vm.isHasInsuranceCodeImage = false\r\n }\r\n }\r\n\r\n function goStep9() {\r\n $state.go(CONFIG.routes.candidate.signup.step9);\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('lx.candidate')\r\n .controller('DocumentController', DocumentController);\r\n\r\n /** @ngInject */\r\n function DocumentController($state, $localStorage, $scope, $rootScope, Upload, CONFIG,\r\n SignupCandidateService, ngToast, $timeout) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.noDocumentation = noDocumentation;\r\n vm.updateUserDocument = updateUserDocument;\r\n vm.selectImageLast = selectImageLast;\r\n vm.removeDocumentFiles = removeDocumentFiles;\r\n vm.goUploadDocument = goUploadDocument;\r\n vm.goAlternativeDocument = goAlternativeDocument;\r\n active();\r\n function active() {\r\n checkOriginalLink();\r\n }\r\n\r\n function checkOriginalLink() {\r\n if (vm.userCandidate.profile.documentUrl) {\r\n vm.fileDocumentUrl = vm.originalLink = angular.copy(vm.userCandidate.profile.documentUrl);\r\n } else {\r\n vm.fileDocumentUrl = vm.originalLink = false;\r\n }\r\n }\r\n\r\n function noDocumentation() {\r\n $state.go(CONFIG.routes.candidate.signup.noDocument);\r\n }\r\n\r\n function goUploadDocument() {\r\n $state.go(CONFIG.routes.candidate.signup.step7);\r\n\r\n }\r\n\r\n function goAlternativeDocument() {\r\n $state.go(CONFIG.routes.candidate.signup.alternativeDocumentation);\r\n\r\n }\r\n\r\n function selectImageLast($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasLastImage = true;\r\n vm.fileDocumentUrl = imgSrc;\r\n $timeout(function () {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeDocumentFiles() {\r\n if (vm.userCandidate.profile.documentUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeUserDocument(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n vm.userCandidate.profile.documentUrl = null\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.fileDocumentUrl) {\r\n vm.fileDocumentUrl = null;\r\n }\r\n if (vm.isHasLastImage) {\r\n vm.isHasLastImage = false\r\n }\r\n\r\n }\r\n\r\n function updateUserDocument() {\r\n if (vm.fileDocumentUrl != vm.originalLink) {\r\n if (vm.documentFile) {\r\n $rootScope.loading = true;\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.documentFile\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.profile.documentUrl = response.data[0].url;\r\n SignupCandidateService.updateUserDocument(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n } else {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateUserDocument(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\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('lx.candidate')\r\n .controller('SignUpCandidateConfirmEmailController', SignUpCandidateConfirmEmailController);\r\n\r\n /** @ngInject */\r\n function SignUpCandidateConfirmEmailController($stateParams, Auth, CONFIG, $rootScope, $state, CommonService, $localStorage) {\r\n var vm = this;\r\n vm.redirectLink = redirectLink;\r\n vm.goHome = goHome;\r\n active();\r\n vm.confirmResponse = null;\r\n\r\n function active() {\r\n $rootScope.loading = true;\r\n if ($localStorage.userProfile && $stateParams.id != $localStorage.userProfile.id) {\r\n delete $localStorage.userProfile;\r\n }\r\n CommonService.confirmEmail($stateParams.id, $stateParams.code).then(function (res) {\r\n $rootScope.loading = false;\r\n vm.confirmSuccess = 1;\r\n vm.confirmResponse = res.data;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.confirmSuccess = 2;\r\n });\r\n }\r\n\r\n function redirectLink() {\r\n if ($localStorage.userProfile) {\r\n $localStorage.userProfile.isEmailConfirmed = true;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n } else {\r\n Auth.logout();\r\n $rootScope.isHasLogin = true;\r\n $state.go(CONFIG.routes.login)\r\n }\r\n\r\n }\r\n\r\n function goHome() {\r\n $state.go(CONFIG.routes.home)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpCommunityInformationController', SignUpCommunityInformationController);\r\n\r\n /** @ngInject */\r\n function SignUpCommunityInformationController($state, $rootScope, CONFIG, $localStorage, SignupCandidateService) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.profileForm8 = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.back = back;\r\n vm.onSupportForSelfEmployed = onSupportForSelfEmployed;\r\n\r\n function onSupportForSelfEmployed() {\r\n $rootScope.loading = true;\r\n SignupCandidateService.supportForSelfEmployed(vm.userCandidate.id, vm.userCandidate).then(function (res) {\r\n $localStorage.userProfile.profile.communityOrOtherUnionInfo = res.data.result.profile.communityOrOtherUnionInfo;\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.signup.communityConfirmation)\r\n }, function () {\r\n $rootScope.loading = false;\r\n });\r\n }\r\n\r\n function back() {\r\n $state.go(CONFIG.routes.candidate.signup.step8)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpCommunityConfirmationController', SignUpCommunityConfirmationController);\r\n\r\n /** @ngInject */\r\n function SignUpCommunityConfirmationController($state, $rootScope, CONFIG, $localStorage, SignupCandidateService) {\r\n if (!$localStorage.userProfile) {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n return;\r\n }\r\n var vm = this;\r\n vm.profileForm8 = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.back = back;\r\n vm.onSupportForSelfEmployed = onSupportForSelfEmployed;\r\n\r\n function onSupportForSelfEmployed() {\r\n $rootScope.loading = true;\r\n SignupCandidateService.supportForSelfEmployed(vm.userCandidate.id, vm.userCandidate).then(function (res) {\r\n $localStorage.userProfile.profile.isUnderstandCommunityRules = res.data.result.profile.isUnderstandCommunityRules;\r\n $rootScope.loading = false;\r\n if (res.data.result.isDeliveryDriver) {\r\n $state.go(CONFIG.routes.candidate.signup.modeOfTransport);\r\n } else {\r\n $state.go(CONFIG.routes.candidate.signup.step9);\r\n }\r\n }, function () {\r\n $rootScope.loading = false;\r\n });\r\n }\r\n\r\n function back() {\r\n $state.go(CONFIG.routes.candidate.signup.communityInformation)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('UnsuitableForCareCandidatelController', UnsuitableForCareCandidatelController);\r\n\r\n /** @ngInject */\r\n function UnsuitableForCareCandidatelController($uibModalInstance, $state, CONFIG, CandidatePortalService) {\r\n\r\n var vm = this;\r\n\r\n vm.backToPortal = backToPortal;\r\n vm.cancel = cancel;\r\n\r\n function backToPortal() {\r\n $uibModalInstance.dismiss('cancel');\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\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('lx.candidate')\r\n .controller('ReasonRefuseCandidateController', ReasonRefuseController);\r\n\r\n /** @ngInject */\r\n function ReasonRefuseController($uibModalInstance, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.refusedReasonIds = [];\r\n vm.getReasons = getReasons;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n\r\n vm.isChecked = isChecked;\r\n vm.sync = sync;\r\n active();\r\n function active() {\r\n getReasons();\r\n }\r\n\r\n function ok() {\r\n if(vm.otherRefusedReason || vm.refusedReasonIds.length > 0){\r\n $uibModalInstance.close({\r\n otherRefusedReason: vm.otherRefusedReason,\r\n refusedReasonIds: vm.refusedReasonIds\r\n });\r\n }\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function getReasons() {\r\n CandidatePortalService.getListReasons().then(function (res) {\r\n vm.reasons = res.data.result.items;\r\n });\r\n }\r\n\r\n function isChecked(id) {\r\n var match = false;\r\n for (var i = 0; i < vm.refusedReasonIds.length; i++) {\r\n if (vm.refusedReasonIds[i] == id) {\r\n match = true;\r\n }\r\n }\r\n return match;\r\n };\r\n function sync(bool, item) {\r\n if (bool) {\r\n vm.refusedReasonIds.push(item.id);\r\n } else {\r\n for (var i = 0; i < vm.refusedReasonIds.length; i++) {\r\n if (vm.refusedReasonIds[i] == item.id) {\r\n vm.refusedReasonIds.splice(i, 1);\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('lx.candidate')\r\n .controller('FutureBookingCandidatelController', FutureBookingCandidatelController);\r\n\r\n /** @ngInject */\r\n function FutureBookingCandidatelController(booking, $uibModalInstance, CommonService, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.cancel = cancel;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.confirmCancel = confirmCancel;\r\n vm.formatDate = formatDate\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n\r\n function confirmCancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n CandidatePortalService.openConfirmCancelModal(vm.booking).then(function () {\r\n });\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\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('lx.candidate')\r\n .controller('ConfirmCancelController', ConfirmCancelController);\r\n\r\n /** @ngInject */\r\n function ConfirmCancelController(booking, $uibModalInstance) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.ok = ok;\r\n vm.close = close;\r\n\r\n function ok() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function close() {\r\n $uibModalInstance.dismiss('cancel');\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('lx.candidate')\r\n .controller('CareQualificationsUploadCandidatelController', CareQualificationsUploadCandidatelController);\r\n\r\n /** @ngInject */\r\n function CareQualificationsUploadCandidatelController($uibModalInstance, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.refusedReasonIds = [];\r\n vm.getReasons = getReasons;\r\n vm.ok = ok;\r\n vm.cancel = cancel;\r\n\r\n vm.isChecked = isChecked;\r\n vm.sync = sync;\r\n active();\r\n function active() {\r\n getReasons();\r\n }\r\n\r\n function ok() {\r\n if(vm.otherRefusedReason || vm.refusedReasonIds.length > 0){\r\n $uibModalInstance.close({\r\n otherRefusedReason: vm.otherRefusedReason,\r\n refusedReasonIds: vm.refusedReasonIds\r\n });\r\n }\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function getReasons() {\r\n CandidatePortalService.getListReasons().then(function (res) {\r\n vm.reasons = res.data.result.items;\r\n });\r\n }\r\n\r\n function isChecked(id) {\r\n var match = false;\r\n for (var i = 0; i < vm.refusedReasonIds.length; i++) {\r\n if (vm.refusedReasonIds[i] == id) {\r\n match = true;\r\n }\r\n }\r\n return match;\r\n };\r\n function sync(bool, item) {\r\n if (bool) {\r\n vm.refusedReasonIds.push(item.id);\r\n } else {\r\n for (var i = 0; i < vm.refusedReasonIds.length; i++) {\r\n if (vm.refusedReasonIds[i] == item.id) {\r\n vm.refusedReasonIds.splice(i, 1);\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('lx.candidate')\r\n .controller('BookingHistoryCandidatelController', BookingHistoryCandidatelController);\r\n\r\n /** @ngInject */\r\n function BookingHistoryCandidatelController(booking,CommonService, CandidatePortalService,$uibModalInstance) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.cancel = cancel;\r\n vm.formatDate = formatDate\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('BookingDetailController', BookingDetailController);\r\n\r\n /** @ngInject */\r\n function BookingDetailController(booking,CommonService,CandidatePortalService, $uibModalInstance) {\r\n\r\n var vm = this;\r\n vm.booking = booking;\r\n vm.cancel = cancel;\r\n vm.formatDate = formatDate;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('YunoQuizCandidateController', YunoQuizCandidateController);\r\n\r\n /** @ngInject */\r\n function YunoQuizCandidateController($rootScope, $state,$window, CONFIG, $localStorage, careCandidatesFactory) {\r\n\r\n var vm = this;\r\n\t\tvm.user = angular.copy($localStorage.userProfile);\n\t\tvm.careCandidate = null;\r\n\r\n\t\tvm.startYunoQuiz = startYunoQuiz;\n\n\t\tif (vm.user) {\n\t\t\t$rootScope.loading = true;\n\n\t\t\tcareCandidatesFactory.getCurrent(vm.user.id)\n\t\t\t\t.then(\n\t\t\t\t\tfunction (careCandidate) {\n\t\t\t\t\t\tif (!careCandidate) {\n\t\t\t\t\t\t\tvm.careCandidate = {};\r\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tvm.careCandidate = careCandidate;\r\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\tconsole.log(error);\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t}\n\t\t\t\t);\r\n\t\t}\r\n\r\n function startYunoQuiz() {\r\n $state.go(CONFIG.routes.candidate.portal.suitableForCare);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('WorkfaceProfileController', WorkfaceProfileController);\r\n\r\n /** @ngInject */\r\n function WorkfaceProfileController($state,User, $rootScope, CONFIG, careCandidatesFactory) {\r\n var vm = this;\r\n\t\tvm.userCandidate = {};\n\t\tvm.careCandidate = null;\r\n vm.goProfileInformation = goProfileInformation;\r\n vm.goProfileAvailability = goProfileAvailability;\r\n vm.goProfileUpload = goProfileUpload;\r\n vm.goPaymentDetails = goPaymentDetails;\r\n vm.goUploadDocument = goUploadDocument;\r\n vm.goBackHomePage = goBackHomePage;\r\n vm.goUploadDocument = goUploadDocument;\r\n\t\tvm.goToDeliveryDriver = goToDeliveryDriver;\n\t\tvm.goToEmploymentRecord = goToEmploymentRecord;\n\r\n\t\tactive();\n\r\n function active() {\r\n\t\t\t$rootScope.loading = true;\n\r\n\t\t\tUser.get().$promise\n\t\t\t\t.then(\n\t\t\t\t\tfunction (resp) {\r\n \r\n\t\t\t\t\t\tvm.userCandidate = resp.result.user;\n\n\t\t\t\t\t\tcareCandidatesFactory.getCurrent(vm.userCandidate.id)\n\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\tfunction (careCandidate) {\n\t\t\t\t\t\t\t\t\tvm.careCandidate = careCandidate;\n\n\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\r\n return vm.userCandidate;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) { \r\n $rootScope.loading = false;\r\n\t\t\t\t\t}\n\t\t\t\t);\r\n }\r\n function goPaymentDetails() {\r\n $state.go(CONFIG.routes.candidate.portal.paymentDetails);\r\n }\r\n\r\n function goProfileInformation() {\r\n $state.go(CONFIG.routes.candidate.portal.profileInformation, {type: 'portal'});\r\n }\r\n\r\n function goProfileAvailability() {\r\n $state.go(CONFIG.routes.candidate.portal.availability, {type: 'portal'});\r\n }\r\n\r\n function goProfileUpload() {\r\n $state.go(CONFIG.routes.candidate.portal.uploadPhoto, {type: 'portal'});\r\n }\r\n\r\n function goUploadDocument() {\r\n $state.go(CONFIG.routes.candidate.portal.uploadDocuments);\r\n }\r\n\r\n function goBackHomePage() {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\r\n\r\n function goToDeliveryDriver(){\r\n $state.go(CONFIG.routes.candidate.portal.modeOfTransport)\r\n\t\t}\n\n\t\tfunction goToEmploymentRecord() {\n\t\t\t$state.go(CONFIG.routes.candidate.portal.employmentRecord, { id: vm.careCandidate.EmploymentRecords[0].Identifier });\r\n\t\t}\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('WheelBookingController', WheelBookingController);\r\n\r\n /** @ngInject */\r\n function WheelBookingController($state, CandidatePortalService, CONFIG ,CommonService, $rootScope) {\r\n var vm = this;\r\n vm.booking = {};\r\n vm.backHomePage = backHomePage;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.formatDate = formatDate;\r\n vm.showTextMainCan = false;\r\n vm.showTextAddCan = false;\r\n getBooking();\r\n function backHomePage() {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n }\r\n\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.booking = data.data.result;\r\n angular.forEach(vm.booking.potentialCandidates, function (item) {\r\n if (item.candidateType == 0) {\r\n vm.showTextMainCan = true;\r\n vm.showTextAddCan = false;\r\n }\r\n else if(item.candidateType == 1) {\r\n vm.showTextAddCan = true;\r\n vm.showTextMainCan = false;\r\n }\r\n })\r\n $rootScope.loading = false;\r\n return vm.booking\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.bookingRequests)\r\n })\r\n }\r\n\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('HomePageCandidateController', HomePageCandidateController);\r\n\r\n /** @ngInject */\r\n function HomePageCandidateController($rootScope, $state, $window, CONFIG, $localStorage, Auth) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n vm.goCurrentStarRating = goCurrentStarRating;\r\n vm.goBookingsHistory = goBookingsHistory;\r\n vm.goCommunityTuPage = goCommunityTuPage;\r\n vm.goEmploymentSupport = goEmploymentSupport;\r\n vm.goCarePathway = goCarePathway;\n vm.logout = logout;\r\n\r\n function goWorkfaceProfile(){\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile);\r\n }\r\n\r\n function goCurrentStarRating(){\r\n $state.go(CONFIG.routes.candidate.portal.currentStarRating);\r\n }\r\n\r\n function goBookingsHistory(){\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory);\r\n }\r\n\r\n function goCommunityTuPage() {\r\n $window.open('http://community-tu.org/');\r\n }\r\n\r\n function goEmploymentSupport() {\r\n $state.go(CONFIG.routes.candidate.portal.employmentSupport);\r\n }\r\n\r\n function goCarePathway() {\r\n\t\t\t//$state.go(CONFIG.routes.candidate.portal.helpUsToHelpYou);\n $state.go(CONFIG.routes.candidate.portal.suitableForCare);\r\n }\n\n function logout() {\n Auth.logout();\r\n $rootScope.isHasLogin = true;\r\n $rootScope.showNewPolicySticky = false;\r\n\r\n delete $localStorage.user;\r\n delete $localStorage.userProfile;\r\n vm.user = null;\r\n\r\n $state.go(CONFIG.routes.login);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('UploadPhotoController', UploadPhotoController);\r\n\r\n /** @ngInject */\r\n function UploadPhotoController($state, $scope, $uibModal, CandidatePortalService, $localStorage, CONFIG, $rootScope, Upload, $sce, ngToast, $timeout) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n vm.isImage = false;\r\n vm.isVideo = false;\r\n vm.isHasVideo = false;\r\n vm.text = $sce.trustAsHtml('
The workface video is a sixty second video where you get a chance to briefly explain about your requirements and sell your skills. Production values of the video are not important as it is what you say and how you say it.
Below is a step by step guide on how create and upload the perfect video using your smart phone. If this seems a bit too scary at this stage you can just upload a photo or move on to the next page.
');\r\n vm.resultImage = null;\r\n vm.isHasImage = false;\r\n vm.uploadFiles = uploadFiles;\r\n vm.openVideoToolTipModal = openVideoToolTipModal;\r\n vm.selectFile = selectFile;\r\n vm.removeFiles = removeFiles;\r\n vm.getApiFunction = getApiFunction;\r\n vm.cropImageApi = null;\r\n vm.myButtonLabels = CONFIG.buttonLabels;\r\n vm.isPlay = true;\r\n vm.play = play;\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n vm.onUpdateVideoOrPhoto = onUpdateVideoOrPhoto;\r\n vm.checkTypeFile = checkTypeFile;\r\n active();\r\n function active() {\r\n checkHasPhotoOrVideo();\r\n }\r\n\r\n function checkHasPhotoOrVideo() {\r\n if (vm.userCandidate.profile.photoUrl && !vm.userCandidate.profile.videoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasPhoto = true;\r\n } else {\r\n vm.isHasPhoto = false;\r\n }\r\n if (vm.userCandidate.profile.videoUrl && vm.userCandidate.profile.photoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasVideo = true;\r\n } else {\r\n vm.isHasVideo = false;\r\n }\r\n }\r\n\r\n\r\n function uploadFiles() {\r\n if (vm.cropImageApi) {\r\n vm.resultImage = vm.cropImageApi.crop();\r\n }\r\n\r\n\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.files) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.isVideo ? vm.files : Upload.dataUrltoBlob(vm.resultImage, vm.files.name)\r\n }\r\n }).then(function (response) {\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile === 1) {\r\n vm.isImage = false;\r\n vm.isHasImage = true;\r\n vm.userCandidate.profile.videoType = null;\r\n vm.userCandidate.profile.photoUrl = '';\r\n vm.userCandidate.profile.photoUrl = response.data[0].url;\r\n onUpdateVideoOrPhoto();\r\n }\r\n if (typeFile === 2) {\r\n vm.userCandidate.profile.videoUrl = '';\r\n vm.userCandidate.profile.videoType = response.data[0].fileType;\r\n vm.userCandidate.profile.videoUrl = response.data[0].url;\r\n vm.userCandidate.profile.photoUrl = response.data[0].url_Thumbnail;\r\n vm.isHasVideo = true;\r\n $rootScope.loading = false;\r\n }\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n vm.isHasVideo = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectFile($files) {\r\n if (vm.files.name !== null) {\r\n vm.photoFile = vm.files.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile !== \"png\" && vm.photoFile !== \"jpg\" && vm.photoFile !== \"jpeg\" && vm.photoFile !== \"gif\" && vm.photoFile !== \"mp4\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and MP4 files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n if ($files.length > 0) {\r\n vm.file = $files[0];\r\n var type = checkTypeFile(vm.file.type);\r\n if (vm.file) {\r\n var imgSrc = URL.createObjectURL(vm.file);\r\n if (type == 1) {\r\n vm.isImage = true;\r\n vm.userCandidate.profile.videoType = null;\r\n if (vm.userCandidate.profile.videoUrl) {\r\n vm.userCandidate.profile.videoUrl = null;\r\n }\r\n }\r\n if (type == 2) {\r\n if (vm.file.size >= 50000000) {\r\n vm.files = null;\r\n vm.fileOnlyUpload = \"Sorry! LB X-Change is supporting file under 50mb\";\r\n return;\r\n }\r\n vm.isVideo = true;\r\n vm.isPlay = true;\r\n vm.userCandidate.profile.videoType = vm.file.type;\r\n if (vm.userCandidate.profile.photoUrl) {\r\n vm.userCandidate.profile.photoUrl = null;\r\n }\r\n uploadFiles();\r\n }\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasImage = false;\r\n vm.fileUrl = imgSrc;\r\n $timeout(function () {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getApiFunction(api) {\r\n vm.cropImageApi = api;\r\n\r\n }\r\n\r\n function checkNameFile(filename) {\r\n var n = filename.split(\".\");\r\n return n[n.length - 1];\r\n\r\n }\r\n\r\n function checkTypeFile(filename) {\r\n var ext = filename.split(\"/\");\r\n if (ext[0].toLowerCase() == \"image\") {\r\n return 1\r\n }\r\n if (ext[0].toLowerCase() == \"video\") {\r\n return 2\r\n }\r\n return\r\n }\r\n\r\n function onUpdateVideoOrPhoto() {\r\n vm.userCandidate.id = vm.userCandidate.id || vm.userCandidate.profile.id;\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile == 1) {\r\n CandidatePortalService.updateUserPhoto(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n if (data.data.result.profile.photoUrl !== null && data.data.result.profile.videoUrl !== null) {\r\n vm.documentImgFile = data.data.result.profile.photoUrl;\r\n vm.documentImgFile = vm.documentFile.split(\".\").pop();\r\n vm.documentVideoFile = data.data.result.profile.videoUrl;\r\n vm.documentVideoFile = vm.documentFile.split(\".\").pop();\r\n if (vm.documentImgFile !== \"png\" && vm.documentImgFile !== \"jpg\" && vm.documentImgFile !== \"jpeg\" && vm.documentImgFile !== \"gif\" && vm.documentVideoFile !== \"mp4\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, GIF JPEG and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n } else if (typeFile == 2) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.updateUserVideo(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n\r\n function openVideoToolTipModal(index) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/signup/partials/addvideo-tooltip-modal.html',\r\n controller: function ($scope, $uibModalInstance, index) {\r\n $scope.index = index;\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n\r\n },\r\n size: 'md',\r\n resolve: {\r\n index: index\r\n }\r\n });\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.userCandidate.profile.photoUrl || vm.userCandidate.profile.videoUrl) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.removeUserPhotoAndVideo(vm.userCandidate.id).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n vm.userCandidate.profile.photoUrl = null;\r\n vm.userCandidate.profile.videoUrl = null;\r\n vm.userCandidate.profile.videoType = null;\r\n checkHasPhotoOrVideo()\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n vm.isHasImage = false;\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.files) {\r\n vm.files = null;\r\n }\r\n if (vm.isImage) {\r\n vm.isImage = false\r\n }\r\n if (vm.isHasVideo) {\r\n vm.isHasVideo = false\r\n }\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n if ($state.params.type === 'signup') {\r\n $state.go(CONFIG.routes.candidate.signup.step6, {}, {reload: true})\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile, {}, {reload: true})\r\n }\r\n }\r\n\r\n function play(e) {\r\n if (!vm.userCandidate.profile.videoType) return;\r\n var elem = angular.element(e.currentTarget).parent().find('video');\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n elem.muted = \"muted\";\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeOut()\r\n elem.on('ended', function () {\r\n if (elem[0].paused) {\r\n elem[0].play();\r\n }\r\n })\r\n } else {\r\n elem[0].pause();\r\n angular.element(e.currentTarget).parent().find('.play-video').fadeIn()\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('lx.candidate')\r\n .controller('UploadPassportDocumentController', UploadPassportDocumentController);\r\n\r\n /** @ngInject */\r\n function UploadPassportDocumentController($state, $localStorage, $scope, CandidatePortalService, $rootScope, Upload, CONFIG, ngToast, $timeout) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.noDocumentation = noDocumentation;\r\n vm.updateUserDocument = updateUserDocument;\r\n vm.updateUserPassport = updateUserPassport;\r\n vm.selectPhotoImageLast = selectPhotoImageLast;\r\n vm.selectDocumentImageLast = selectDocumentImageLast;\r\n vm.removePassportFiles = removePassportFiles;\r\n vm.removeDocumentFiles = removeDocumentFiles;\r\n vm.backToProfile = backToProfile;\r\n vm.onUpdateAlternavtiveDoc = onUpdateAlternavtiveDoc;\r\n vm.goUploadDocument = goUploadDocument;\r\n vm.goAlternativeDocument = goAlternativeDocument;\r\n vm.showImgFilePassport = true;\r\n vm.showPdfFilePassport = false;\r\n vm.showImgFileDocument = true;\r\n vm.showPdfFileDocument = false;\r\n if (vm.userCandidate.profile.passportUrl !== null) {\r\n vm.pdfFileCurrentPassport = vm.userCandidate.profile.passportUrl;\r\n vm.pdfFileCurrentPassport = vm.pdfFileCurrentPassport.split(\".\").pop();\r\n }\r\n if (vm.userCandidate.profile.documentUrl !== null) {\r\n vm.pdfFileCurrentDocument = vm.userCandidate.profile.documentUrl;\r\n vm.pdfFileCurrentDocument = vm.pdfFileCurrentDocument.split(\".\").pop();\r\n }\r\n function noDocumentation() {\r\n $state.go(CONFIG.routes.candidate.portal.noDocument);\r\n }\r\n\r\n function selectPhotoImageLast($files) {\r\n if (vm.copyOfPassport) {\r\n vm.photoFilePassport = vm.copyOfPassport.name;\r\n vm.photoFilePassport = vm.photoFilePassport.split(\".\").pop().toLowerCase();\r\n if (vm.photoFilePassport == \"pdf\") {\r\n vm.showImgFilePassport = false;\r\n vm.showPdfFilePassport = true;\r\n } else {\r\n vm.showImgFilePassport = true;\r\n vm.showPdfFilePassport = false;\r\n }\r\n if (vm.photoFilePassport !== \"png\" && vm.photoFilePassport !== \"jpg\" && vm.photoFilePassport !== \"jpeg\" && vm.photoFilePassport !== \"gif\" && vm.photoFilePassport !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasLastPhotoImage = true;\r\n vm.filePhotoUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function selectDocumentImageLast($files) {\r\n if (vm.documentFile) {\r\n vm.photoFileDocument = vm.documentFile.name;\r\n vm.photoFileDocument = vm.photoFileDocument.split(\".\").pop().toLowerCase();\r\n if (vm.photoFileDocument == \"pdf\") {\r\n vm.showImgFileDocument = false;\r\n vm.showPdfFileDocument = true;\r\n } else {\r\n vm.showImgFileDocument = true;\r\n vm.showPdfFileDocument = false;\r\n }\r\n if (vm.photoFileDocument !== \"png\" && vm.photoFileDocument !== \"jpg\" && vm.photoFileDocument !== \"jpeg\" && vm.photoFileDocument !== \"gif\" && vm.photoFileDocument !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasLastDocumentImage = true;\r\n vm.fileDocumentUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function updateUserPassport() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyOfPassport) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyOfPassport\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.profile.passportUrl = response.data[0].url;\r\n CandidatePortalService.updateUserPassport(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n if (data.data.result.profile.passportUrl !== null) {\r\n vm.documentFile = data.data.result.profile.passportUrl;\r\n vm.documentFile = vm.documentFile.split(\".\").pop().toLowerCase();\r\n if (vm.documentFile !== \"png\" && vm.documentFile !== \"jpg\" && vm.documentFile !== \"jpeg\" && vm.documentFile !== \"gif\" && vm.documentFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function updateUserDocument() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.documentFile) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.documentFile\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.profile.documentUrl = response.data[0].url;\r\n CandidatePortalService.updateUserDocument(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n if (data.data.result.profile.documentUrl !== null) {\r\n vm.documentFile = data.data.result.profile.documentUrl;\r\n vm.documentFile = vm.documentFile.split(\".\").pop().toLowerCase();\r\n if (vm.documentFile !== \"png\" && vm.documentFile !== \"jpg\" && vm.documentFile !== \"jpeg\" && vm.documentFile !== \"gif\" && vm.documentFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function removePassportFiles() {\r\n if (vm.userCandidate.profile.passportUrl) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.removeUserPassport(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n vm.userCandidate.profile.passportUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.filePhotoUrl) {\r\n vm.filePhotoUrl = null;\r\n }\r\n if (vm.isHasLastPhotoImage) {\r\n vm.isHasLastPhotoImage = false\r\n }\r\n }\r\n\r\n function removeDocumentFiles() {\r\n if (vm.userCandidate.profile.documentUrl) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.removeUserDocument(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n vm.userCandidate.profile.documentUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.fileDocumentUrl) {\r\n vm.fileDocumentUrl = null;\r\n }\r\n if (vm.isHasLastDocumentImage) {\r\n vm.isHasLastDocumentImage = false\r\n }\r\n }\r\n\r\n function backToProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile)\r\n }\r\n\r\n function onUpdateAlternavtiveDoc() {\r\n updateUserDocument();\r\n backToProfile();\r\n }\r\n\r\n function goUploadDocument() {\r\n $state.go(CONFIG.routes.candidate.portal.uploadDocuments);\r\n\r\n }\r\n\r\n function goAlternativeDocument() {\r\n $state.go(CONFIG.routes.candidate.portal.alternativeDocumentation);\r\n\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('UploadDeliveryDriverDocumentController', UploadDeliveryDriverDocumentController);\r\n\r\n /** @ngInject */\r\n function UploadDeliveryDriverDocumentController($state, $localStorage, $timeout, SignupCandidateService, $rootScope, Upload, CONFIG, ngToast) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n if ($localStorage.userProfile) {\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n }\r\n vm.updateProofOfAddress = updateProofOfAddress;\r\n vm.updateVehicle = updateVehicle;\r\n vm.selectProofOfAddressImage = selectProofOfAddressImage;\r\n vm.selectVehicleImage = selectVehicleImage;\r\n vm.removeProofOfAddressFiles = removeProofOfAddressFiles;\r\n vm.removeVehicleFiles = removeVehicleFiles;\r\n vm.goUploadDBSCertificatePage = goUploadDBSCertificatePage;\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n active();\r\n function active() {\r\n }\r\n\r\n\r\n function updateProofOfAddress() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyProofOfAddress) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyProofOfAddress\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.proofOfAddressUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function updateVehicle() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyOfVehicle) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyOfVehicle\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.vehicleUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectProofOfAddressImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasProofOfAddressImage = true;\r\n vm.fileProofOfAddressUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function selectVehicleImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasVehicleImage = true;\r\n vm.fileVehicleUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeProofOfAddressFiles() {\r\n if (vm.userCandidate.deliveryDriver.proofOfAddressUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeProofOfAddress(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.proofOfAddressUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileProofOfAddressUrl) {\r\n vm.fileProofOfAddressUrl = null;\r\n }\r\n if (vm.isHasProofOfAddressImage) {\r\n vm.isHasProofOfAddressImage = false\r\n }\r\n }\r\n\r\n function removeVehicleFiles() {\r\n if (vm.userCandidate.deliveryDriver.vehicleUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeVehicle(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.vehicleUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileVehicleUrl) {\r\n vm.fileVehicleUrl = null;\r\n }\r\n if (vm.isHasVehicleImage) {\r\n vm.isHasVehicleImage = false\r\n }\r\n }\r\n\r\n vm.goUploadDBSCertificatePage = goUploadDBSCertificatePage;\r\n function goUploadDBSCertificatePage() {\r\n $state.go(CONFIG.routes.candidate.portal.uploadDBSCertificate);\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile, {}, {reload: true});\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('UploadDBSCertificateController', UploadDBSCertificateController);\r\n\r\n /** @ngInject */\r\n function UploadDBSCertificateController(SignupCandidateService, Upload, ngToast, $timeout, $rootScope, $state, $window, CONFIG, $localStorage) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n if ($localStorage.userProfile) {\r\n vm.userCandidate.profile = angular.copy($localStorage.userProfile.profile) || {};\r\n }\r\n vm.updateDBSCertificate = updateDBSCertificate;\r\n vm.selectDBSCertificateImage = selectDBSCertificateImage;\r\n vm.removeDBSCertificateFiles = removeDBSCertificateFiles;\r\n vm.updateDeliveryDriver = updateDeliveryDriver;\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n active();\r\n function active() {\r\n }\r\n\r\n\r\n function updateDBSCertificate() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyDBSCertificate) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyDBSCertificate\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.dbsCertificateUrl = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectDBSCertificateImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasDBSCertificateImage = true;\r\n vm.fileDBSCertificateUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeDBSCertificateFiles() {\r\n if (vm.userCandidate.deliveryDriver.dbsCertificateUrl) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeDBSCertificate(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.dbsCertificateUrl = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileDBSCertificateUrl) {\r\n vm.fileDBSCertificateUrl = null;\r\n }\r\n if (vm.isHasDBSCertificateImage) {\r\n vm.isHasDBSCertificateImage = false\r\n }\r\n }\r\n\r\n function updateDeliveryDriver() {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n $state.go(CONFIG.routes.candidate.portal.insuranceCode);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n else {\r\n $state.go(CONFIG.routes.candidate.portal.insuranceCode);\r\n }\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile, {}, {reload: 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('lx.candidate')\r\n .controller('SuitableForCareCandidateController', SuitableForCareCandidateController);\r\n\r\n /** @ngInject */\r\n\tfunction SuitableForCareCandidateController($rootScope, $state, $window, CONFIG, $localStorage, careCandidatesFactory) {\r\n\r\n var vm = this;\n vm.labourXchangeWebsite = LabourXchange.Website.LabourXchange.Site;\r\n\t\tvm.user = angular.copy($localStorage.userProfile);\n\t\tvm.careCandidate = null;\r\n\r\n vm.notForMe = notForMe;\r\n vm.whatsTheProcess = whatsTheProcess;\r\n\t\tvm.becomeEligible = becomeEligible;\n\n\t\tif (vm.user) {\n\t\t\t$rootScope.loading = true;\n\n\t\t\tcareCandidatesFactory.getCurrent(vm.user.id)\n\t\t\t\t.then(\n\t\t\t\t\tfunction (careCandidate) {\n\t\t\t\t\t\tif (!careCandidate) {\n\t\t\t\t\t\t\tvm.careCandidate = {};\r\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvm.careCandidate = careCandidate;\r\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\tconsole.log(error);\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t}\n\t\t\t\t);\r\n\t\t}\r\n\r\n function notForMe() {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\r\n\r\n function whatsTheProcess() {\r\n\r\n }\r\n\r\n function becomeEligible() {\r\n $state.go(CONFIG.routes.candidate.portal.becomeEligibleForCare);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('RatingStarCandidateController', RatingStarCandidateController);\r\n\r\n /** @ngInject */\r\n function RatingStarCandidateController($state, $rootScope,CONFIG, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.submitRatingStar = submitRatingStar;\r\n getBooking();\r\n function getBooking() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.ratingStar = data.data.result;\r\n\r\n CandidatePortalService.getClientRateByCandidate(vm.ratingStar.potentialCandidates[0].id).then(function (data) {\r\n vm.ratingStarList = data.data.result || {};\r\n vm.ratingStarListOrigin = angular.copy(vm.ratingStarList)\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function submitRatingStar() {\r\n var resultCompare = angular.equals(vm.ratingStarList, vm.ratingStarListOrigin);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.rateClient(vm.ratingStar.potentialCandidates[0].id, vm.ratingStarList).then(function () {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\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('lx.candidate')\r\n .controller('ProfileInformationController', ProfileInformationController);\r\n\r\n /** @ngInject */\r\n function ProfileInformationController(CONFIG, $localStorage, $rootScope, CandidatePortalService, SignupCandidateService, $state, dataList, ngToast) {\r\n var vm = this;\r\n vm.profileForm = [];\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.receivingEmailStatus = CONFIG.receivingEmailStatus;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.checkBOD = false;\r\n vm.checkBODOverLimit = false;\r\n if (vm.userCandidate) {\r\n if (vm.userCandidate.profile) {\r\n vm.userCandidate.profile.dateOfBirth = vm.userCandidate.profile.dateOfBirth ? new Date(vm.userCandidate.profile.dateOfBirth) : '';\r\n }\r\n }\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.dateOptions = {\r\n maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate())\r\n };\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.updateCandidates = updateCandidates;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.checkBODDate = checkBODDate;\r\n vm.resetCheckBOD = resetCheckBOD;\r\n vm.goToDeliveryDriver = goToDeliveryDriver;\r\n vm.goToHowCommunicate = goToHowCommunicate;\r\n vm.requestDeleteAccount = requestDeleteAccount;\r\n vm.updateReceivingEmailStatus = updateReceivingEmailStatus;\r\n activate();\r\n\r\n function activate() {\r\n getValuesMostSearchByClient();\r\n getTypeOfWork();\r\n getEmploymentStatuses();\r\n getKeySkills();\r\n getWorkExperiences();\r\n }\r\n\r\n function getValuesMostSearchByClient() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getValuesMostSearchByClient().then(function (data) {\r\n $rootScope.loading = false;\r\n vm.valuesMostSearch = data.data.result;\r\n })\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n dataList.getEmploymentStatuses().then(function (data) {\r\n vm.employmentStatuses = data.data.result.items;\r\n })\r\n }\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\r\n })\r\n }\r\n\r\n function updateCandidates() {\r\n if (vm.profileForm.$valid && !vm.checkBODOverLimit) {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n $localStorage.address = vm.userCandidate.profile.address;\r\n SignupCandidateService.updateCandidateUserFull(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.showNewPolicySticky = vm.userCandidate.isAcceptedGDPR ? false : true;\r\n $rootScope.loading = false;\r\n goWorkfaceProfile()\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n } else {\r\n goWorkfaceProfile()\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n\r\n function checkBODDate(BODDate) {\r\n vm.checkBOD = true;\r\n if (BODDate && BODDate.getTime() > vm.dateOptions.maxDate.getTime()) {\r\n vm.checkBODOverLimit = true;\r\n } else {\r\n vm.checkBODOverLimit = false;\r\n }\r\n\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n if ($state.params.type === 'signup') {\r\n $state.go(CONFIG.routes.candidate.signup.step6)\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile)\r\n }\r\n }\r\n\r\n function requestDeleteAccount() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.requestDeleteAccount().then(function () {\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n })\r\n }\r\n\r\n function resetCheckBOD() {\r\n vm.checkBOD = false;\r\n }\r\n\r\n function goToHowCommunicate() {\r\n $state.go(CONFIG.routes.candidate.portal.howCommunicate)\r\n }\r\n\r\n function goToDeliveryDriver() {\r\n $state.go(CONFIG.routes.candidate.portal.modeOfTransport)\r\n }\r\n\r\n function updateReceivingEmailStatus(status) {\r\n $rootScope.loading = true;\r\n var dataReq = {\r\n receivingEmailStatus: status,\r\n id: vm.userCandidate.id\r\n };\r\n CandidatePortalService.receivingEmail(dataReq).then(function (res) {\r\n vm.userCandidate.receivingEmailStatus = res.data.result.receivingEmailStatus;\r\n $localStorage.userProfile.receivingEmailStatus = res.data.result.receivingEmailStatus;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function () {\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = 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\r\n .module('lx.candidate')\r\n .controller('PaymentDetailsController', PaymentDetailsController);\r\n\r\n /** @ngInject */\r\n function PaymentDetailsController($state, $rootScope, CONFIG ,$localStorage, SignupCandidateService) {\r\n var vm = this;\r\n vm.paymentDetailForm = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.onBackToProfile = onBackToProfile;\r\n vm.onEarningToDate = onEarningToDate;\r\n function onBackToProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile)\r\n }\r\n\r\n function onEarningToDate() {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n SignupCandidateService.createUserBillingInfo(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory)\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory)\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('lx.candidate')\r\n .controller('ModeOfTransportController', ModeOfTransportController);\r\n\r\n /** @ngInject */\r\n function ModeOfTransportController(SignupCandidateService, dataList, $rootScope, $state, $window, CONFIG, $localStorage) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.user);\r\n vm.transportationModes = [];\r\n vm.updateDeliveryDriver = updateDeliveryDriver;\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n activate();\r\n\r\n function activate() {\r\n getTransportationModes();\r\n }\r\n\r\n function getTransportationModes() {\r\n dataList.getTransportationModes().then(function (data) {\r\n vm.transportationModes = data.data.result.items;\r\n })\r\n }\r\n function updateDeliveryDriver() {\r\n var resultCompare = angular.equals(vm.user, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateDeliveryDriver(vm.user).then(function(res){\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = res.data.result;\r\n $state.go(CONFIG.routes.candidate.portal.uploadDeliveryDriverDocument);\r\n },function(){\r\n $rootScope.loading = false;\r\n });\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.uploadDeliveryDriverDocument);\r\n }\r\n }\r\n function goWorkfaceProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile, {}, {reload: 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('lx.candidate')\r\n .controller('InsuranceCodeController', InsuranceCodeController);\r\n\r\n /** @ngInject */\r\n function InsuranceCodeController(SignupCandidateService, $timeout, Upload, ngToast, $rootScope, $state, $window, CONFIG, $localStorage) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.updateInsuranceCode = updateInsuranceCode;\r\n vm.selectInsuranceCodeImage = selectInsuranceCodeImage;\r\n vm.removeInsuranceCodeFiles = removeInsuranceCodeFiles;\r\n vm.goAlreadyToGoAndEarnExtra = goAlreadyToGoAndEarnExtra;\r\n vm.goWorkfaceProfile = goWorkfaceProfile;\r\n function updateInsuranceCode() {\r\n vm.userCandidate.id = $localStorage.userProfile.id || vm.userCandidate.profile.id;\r\n if (vm.copyInsuranceCode) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.userCandidate.id,\r\n data: {\r\n file: vm.copyInsuranceCode\r\n }\r\n }).then(function (response) {\r\n vm.userCandidate.deliveryDriver.insuranceCode = response.data[0].url;\r\n SignupCandidateService.updateDeliveryDriver(vm.userCandidate).then(function (data) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function selectInsuranceCodeImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasInsuranceCodeImage = true;\r\n vm.fileInsuranceCodeUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeInsuranceCodeFiles() {\r\n if (vm.userCandidate.deliveryDriver.insuranceCode) {\r\n $rootScope.loading = true;\r\n SignupCandidateService.removeInsuranceCode(vm.userCandidate.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.userCandidate.deliveryDriver.insuranceCode = null;\r\n $localStorage.userProfile = data.data.result;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileInsuranceCodeUrl) {\r\n vm.fileInsuranceCodeUrl = null;\r\n }\r\n if (vm.isHasInsuranceCodeImage) {\r\n vm.isHasInsuranceCodeImage = false\r\n }\r\n }\r\n\r\n function goAlreadyToGoAndEarnExtra() {\r\n $state.go(CONFIG.routes.candidate.portal.alreadyToGoAndEarnExtra);\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile, {}, {reload: 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('lx.candidate')\r\n .controller('CandidateHowCommunicateController', CandidateHowCommunicateController);\r\n\r\n /** @ngInject */\r\n function CandidateHowCommunicateController($state, $rootScope, CONFIG ,$localStorage, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.profileHowCommunicateForm = [];\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.updateCandidateUserContact = updateCandidateUserContact;\r\n if (!vm.userCandidate.communicate) {\r\n vm.userCandidate.communicate = {\r\n isEmailAddress: true,\r\n isSecondEmailAddress: false,\r\n isTelephoneNumber: false,\r\n isMobileNumber: false\r\n }\r\n }\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n function updateCandidateUserContact() {\r\n if (vm.profileHowCommunicateForm.$valid) {\r\n var resultCompare = angular.equals(vm.userCandidate, vm.userCandidateTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.updateCandidateUserContact(vm.userCandidate).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n})();\r\n\n(function () {\r\n\t'use strict';\r\n\r\n\tangular\r\n\t\t.module('lx.candidate')\r\n .controller('HelpUsToHelpYouCandidateController', HelpUsToHelpYouCandidateController);\r\n\r\n\t/** @ngInject */\r\n function HelpUsToHelpYouCandidateController($rootScope, $state, $window, CONFIG, $localStorage, CandidatePortalService, careCandidatesFactory) {\r\n\r\n\t\tvar vm = this;\n vm.labourXchangeWebsite = LabourXchange.Website.LabourXchange.Site;\n vm.enums = LabourXchange.Enums;\r\n vm.user = angular.copy($localStorage.userProfile);\n vm.allQuestionsCompleted = false;\n vm.proceedToCarePathway = false;\r\n\r\n vm.finish = finish;\n vm.findOutMore = findOutMore;\n vm.backToHomepage = backToHomepage;\r\n\n\t\tif (vm.user) {\n\t\t\t$rootScope.loading = true;\n\n\t\t\tcareCandidatesFactory.getCurrent(vm.user.id)\n\t\t\t\t.then(\n\t\t\t\t\tfunction (careCandidate) {\n\t\t\t\t\t\tif (!careCandidate) {\n\t\t\t\t\t\t\tvm.careCandidate = {\n\t\t\t\t\t\t\t\tUser: {\n Id: vm.user.id\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n vm.careCandidate = careCandidate;\n\n if (checkAccessToCarePathway()) {\n vm.allQuestionsCompleted = true;\n vm.proceedToCarePathway = checkAccessToCarePathway();\n\n if (vm.proceedToCarePathway) $state.go(CONFIG.routes.candidate.portal.suitableForCare);\r\n }\r\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\tconsole.log(error);\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t}\n\t\t\t\t);\r\n\t\t}\n\r\n function finish() {\n vm.error = false;\n\r\n if (vm.careCandidate.GoodEmployer && vm.careCandidate.BanksImproveMost && vm.careCandidate.MostImportantQualities && vm.careCandidate.WorseOrderingTakeaway && vm.careCandidate.MostImportantQualitiesWork && vm.careCandidate.BestEmployee && vm.careCandidate.FriendsFamilyDescribeYou && vm.careCandidate.ChooseFilmPreferance && vm.careCandidate.WorstPartNewJob && vm.careCandidate.OftenBored && vm.careCandidate.WorstPartCookDinner && vm.careCandidate.MachinesBetterHumans) {\n var personalInteractionScore = 0;\n var repetitiveTasksScore = 0;\n\n personalInteractionScore = (vm.careCandidate.GoodEmployer + vm.careCandidate.BanksImproveMost + vm.careCandidate.MostImportantQualities) - (vm.careCandidate.WorseOrderingTakeaway + vm.careCandidate.MostImportantQualitiesWork + vm.careCandidate.BestEmployee);\n repetitiveTasksScore = (vm.careCandidate.OftenBored + vm.careCandidate.WorstPartCookDinner + vm.careCandidate.MachinesBetterHumans) - (vm.careCandidate.FriendsFamilyDescribeYou + vm.careCandidate.ChooseFilmPreferance + vm.careCandidate.WorstPartNewJob);\n\n $rootScope.loading = true;\n\n careCandidatesFactory.saveCareCandidate(vm.careCandidate)\n .then(\n function (careCandidate) {\n vm.allQuestionsCompleted = true;\n vm.proceedToCarePathway = checkAccessToCarePathway();\n\n $rootScope.loading = false;\r\n },\n function (error) {\n console.log(error);\n\n $rootScope.loading = false;\r\n }\n );\n\n \r\n }\n else {\n vm.error = true;\r\n }\r\n }\n\n function findOutMore() {\n $state.go(CONFIG.routes.candidate.portal.suitableForCare);\r\n }\n\n function backToHomepage() {\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }\n\n function checkAccessToCarePathway() {\n if (vm.careCandidate.GoodEmployer && vm.careCandidate.BanksImproveMost && vm.careCandidate.MostImportantQualities && vm.careCandidate.WorseOrderingTakeaway && vm.careCandidate.MostImportantQualitiesWork && vm.careCandidate.BestEmployee && vm.careCandidate.FriendsFamilyDescribeYou && vm.careCandidate.ChooseFilmPreferance && vm.careCandidate.WorstPartNewJob && vm.careCandidate.OftenBored && vm.careCandidate.WorstPartCookDinner && vm.careCandidate.MachinesBetterHumans) {\n var personalInteractionScore = 0;\n var repetitiveTasksScore = 0;\n\n personalInteractionScore = (vm.careCandidate.GoodEmployer + vm.careCandidate.BanksImproveMost + vm.careCandidate.MostImportantQualities) - (vm.careCandidate.WorseOrderingTakeaway + vm.careCandidate.MostImportantQualitiesWork + vm.careCandidate.BestEmployee);\n repetitiveTasksScore = (vm.careCandidate.OftenBored + vm.careCandidate.WorstPartCookDinner + vm.careCandidate.MachinesBetterHumans) - (vm.careCandidate.FriendsFamilyDescribeYou + vm.careCandidate.ChooseFilmPreferance + vm.careCandidate.WorstPartNewJob);\n\n if (personalInteractionScore >= 4 && repetitiveTasksScore >= 2) {\n return true;\r\n }\r\n }\n\n return false;\r\n }\r\n\t}\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('EmploymentSupportController', EmploymentSupportController);\r\n\r\n /** @ngInject */\r\n function EmploymentSupportController($rootScope, $state, CONFIG, $localStorage, CommonService) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.filter = {\r\n typeName: CONFIG.pageTypes.employmentSupport,\r\n pageNo: 1,\r\n pageSize: 25\r\n };\r\n vm.routeConfig = CONFIG.routes;\r\n vm.newsPage = null;\r\n vm.communityMembershipExpires = '';\r\n vm.contentPageRows = [];\r\n\r\n vm.goEmploymentSupportNews = goEmploymentSupportNews;\r\n\r\n active();\r\n calculateCommunityMembershipExpiry();\r\n\r\n function active() {\r\n getListNewsPage();\r\n }\r\n\r\n function goEmploymentSupportNews() {\r\n $state.go(CONFIG.routes.candidate.portal.employmentSupportNews);\r\n }\r\n\r\n function calculateCommunityMembershipExpiry() {\r\n if (vm.user.profile.communityMembershipExpiry) {\r\n var today = moment()\r\n var communityMembershipExpiryDate = moment(vm.user.profile.communityMembershipExpiry);\r\n var expiresIn = moment.duration(communityMembershipExpiryDate.diff(today)).asDays();\r\n\r\n if (expiresIn > 0) {\r\n vm.communityMembershipExpires = 'Your free membership runs out in ' + parseInt(expiresIn) + ' day(s), to renew ';\r\n }\r\n else {\r\n vm.communityMembershipExpires = 'Your free membership has run out, to renew ';\r\n }\r\n }\r\n }\r\n\r\n function getListNewsPage() {\r\n //vm.landingPages = [\r\n // { title: '1' },\r\n // { title: '2' },\r\n // { title: '3' },\r\n // { title: '4' },\r\n // { title: '5' },\r\n //];\r\n\r\n //var contentColumns = [];\r\n\r\n //for (var i = 0; i < vm.landingPages.length; i++) {\r\n // //if (vm.landingPages[i].pageType.name === 'Employment support (news)') {\r\n // // vm.newsPage = vm.landingPages[i];\r\n // // break;\r\n // //}\r\n // //else {\r\n // contentColumns.push(vm.landingPages[i]);\r\n\r\n // if (contentColumns.length % 3 === 0) {\r\n // vm.contentPageRows.push(contentColumns);\r\n // contentColumns = [];\r\n // }\r\n // //}\r\n //}\r\n\r\n //if (contentColumns.length > 0) vm.contentPageRows.push(contentColumns);\r\n\r\n //debugger;\r\n\r\n $rootScope.loading = true;\r\n\r\n CommonService.getListPagesByPageType(vm.filter).then(\r\n function (res) {\r\n vm.landingPages = res.data.result.items;\r\n\r\n if (vm.landingPages.length == 0) {\r\n vm.listLandingResponse = 'No news';\r\n }\r\n else {\r\n var contentColumns = [];\r\n\r\n for (var i = 0; i < vm.landingPages.length; i++) {\r\n if (vm.landingPages[i].pageType.name === 'Employment support (news)') {\r\n vm.newsPage = vm.landingPages[i];\r\n break;\r\n }\r\n else {\r\n contentColumns.push(vm.landingPages[i]);\r\n\r\n if (contentColumns.length % 3 === 0) {\r\n vm.contentPageRows.push(contentColumns);\r\n contentColumns = [];\r\n }\r\n }\r\n }\r\n\r\n if (contentColumns.length > 0) vm.contentPageRows.push(contentColumns);\r\n }\r\n\r\n $rootScope.loading = false;\r\n },\r\n function (error) {\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No news';\r\n }\r\n );\r\n }\r\n\r\n function goNewsPage() {\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('lx.candidate')\r\n .controller('EmploymentSupportNewsController', EmploymentSupportNewsController);\r\n\r\n /** @ngInject */\r\n function EmploymentSupportNewsController($state, $rootScope, CONFIG, CommonService) {\r\n var vm = this;\r\n\r\n vm.filter = {\r\n typeName: CONFIG.pageTypes.employmentSupportNews,\r\n pageNo: 1,\r\n pageSize: 25\r\n };\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.routeConfig = CONFIG.routes;\r\n vm.clickDisplayTitleNews = clickDisplayTitleNews;\r\n vm.loadMoreLandings = loadMoreLandings;\r\n vm.landingPages = [];\r\n vm.displayTitleNews = '';\r\n\r\n active();\r\n\r\n function clickDisplayTitleNews(title) {\r\n vm.displayTitleNews = title;\r\n }\r\n\r\n function active() {\r\n getListNewsPage();\r\n }\r\n\r\n function getListNewsPage() {\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = res.data.result.items;\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length == 0) {\r\n vm.listLandingResponse = 'No news';\r\n } else {\r\n vm.displayTitleNews = vm.landingPages[0].title;\r\n if (vm.landingPages.length < vm.totalLanding) {\r\n vm.loadMoreLanding = true;\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No news';\r\n })\r\n }\r\n\r\n function loadMoreLandings() {\r\n if (vm.loadMoreLanding) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = vm.landingPages.concat(res.data.result.items);\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length >= vm.totalLanding) {\r\n vm.loadMoreLanding = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No news';\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('lx.candidate')\r\n\t\t.controller('EmploymentRecordDocumentController', EmploymentRecordDocumentController);\r\n\r\n /** @ngInject */\r\n\tfunction EmploymentRecordDocumentController($rootScope, $state, $localStorage, $scope, CandidatePortalService, Upload, CONFIG, ngToast, $timeout, employmentRecordsFactory, documentsFactory, signaturePadFactory) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n\t\tvm.userCandidate = angular.copy($localStorage.userProfile);\n\t\tvm.employmentRecord = null;\n\n\t\tvm.uploadDBSCheckDocument = uploadDBSCheckDocument;\n\t\tvm.uploadedSignedContract = uploadedSignedContract;\n\t\tvm.clearSignature = clearSignature;\n\t\tvm.saveEmploymentRecord = saveEmploymentRecord;\n\t\tvm.backToProfile = backToProfile;\r\n\n\t\tif ($state.params.id) {\n\t\t\t$rootScope.loading = true;\n\n\t\t\temploymentRecordsFactory.getEmploymentRecord($state.params.id)\n\t\t\t\t.then(\n\t\t\t\t\tfunction (employmentRecord) {\n\t\t\t\t\t\tvm.employmentRecord = employmentRecord;\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\tconsole.log(error);\n\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$state.go(CONFIG.routes.candidate.portal.workfaceProfile);\r\n\t\t}\n\n\t\tfunction uploadDBSCheckDocument(files) {\n\t\t\tif (files && files.length === 1) {\n\t\t\t\t$rootScope.loading = true;\n\n\t\t\t\tdocumentsFactory.uploadDocument(files[0])\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction (document) {\n\t\t\t\t\t\t\tvm.employmentRecord.DBSCheckDocument = document;\n\n\t\t\t\t\t\t\temploymentRecordsFactory.saveEmploymentRecord(vm.employmentRecord)\n\t\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\t\tfunction (employmentRecord) {\n\t\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\t\t\t\t\tvm.employmentRecord = employmentRecord;\r\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t$rootScope.loading = false;\n\t\t\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\r\n\t\t}\n\n\t\tfunction uploadedSignedContract(files) {\n\t\t\tif (files && files.length === 1) {\n\t\t\t\t$rootScope.loading = true;\n\n\t\t\t\tdocumentsFactory.uploadDocument(files[0])\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction (document) {\n\t\t\t\t\t\t\tvm.employmentRecord.SignedContractDocument = document;\n\n\t\t\t\t\t\t\temploymentRecordsFactory.saveEmploymentRecord(vm.employmentRecord)\n\t\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\t\tfunction (employmentRecord) {\n\t\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\t\t\t\t\tvm.employmentRecord = employmentRecord;\r\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t$rootScope.loading = false;\n\t\t\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\r\n\t\t}\n\n\t\tfunction clearSignature() {\n\t\t\tsignaturePadFactory.initialise();\r\n\t\t\tsignaturePadFactory.clear();\r\n\t\t\tvm.employmentRecord.DigitalSignature = null;\r\n\t\t}\n\n\t\tfunction saveEmploymentRecord() {\n\t\t\temploymentRecordsFactory.saveEmploymentRecord(vm.employmentRecord)\n\t\t\t\t.then(\n\t\t\t\t\tfunction (employmentRecord) {\n\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\tvm.employmentRecord = employmentRecord;\r\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t$rootScope.loading = false;\n\n\t\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t\t}\n\t\t\t\t);\r\n\t\t}\n\r\n function backToProfile() {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('CurrentStarRatingController', CurrentStarRatingController);\r\n\r\n /** @ngInject */\r\n function CurrentStarRatingController(CandidatePortalService, CONFIG ,$localStorage,$rootScope,$state) {\r\n var vm = this;\r\n vm.userCandidate = angular.copy($localStorage.userProfile);\r\n vm.backHomePage = backHomePage;\r\n vm.currentRating = {};\r\n getCurrentRating();\r\n function backHomePage(){\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n }\r\n function getCurrentRating() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getCandidateCurrentRating(vm.userCandidate.id).then(function(data){\r\n vm.currentRating = data.data.result;\r\n $rootScope.loading = false;\r\n return vm.currentRating;\r\n },function(){\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\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('lx.candidate')\r\n .controller('CancelBookingController', CancelBookingController);\r\n\r\n /** @ngInject */\r\n function CancelBookingController(CandidatePortalService,CommonService, CONFIG,$uibModal, $rootScope, $state) {\r\n var vm = this;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.openCancelToolTipModal = openCancelToolTipModal;\r\n vm.formatDate = formatDate;\r\n vm.backHomePage = backHomePage;\r\n vm.cancelBooking = {};\r\n getBookingCancel();\r\n function backHomePage(){\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n }\r\n function getBookingCancel() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getBookingCandidate($state.params.id).then(function (data) {\r\n vm.cancelBooking = data.data.result;\r\n $rootScope.loading = false;\r\n return vm.cancelBooking;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory)\r\n })\r\n }\r\n\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n\r\n function openCancelToolTipModal(bookingId) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/partials/confirm-cancel-modal.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close(true);\r\n };\r\n $scope.ok = function () {\r\n $rootScope.loading = true;\r\n CandidatePortalService.cancelBookingByCandidate(bookingId).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory);\r\n },function(){\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory);\r\n });\r\n };\r\n\r\n },\r\n size :'md'\r\n });\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\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('lx.candidate')\r\n .controller('BookingsHistoryController', BookingsHistoryController);\r\n\r\n /** @ngInject */\r\n function BookingsHistoryController(CandidatePortalService,CommonService,CONFIG, $filter,$rootScope, $state) {\r\n var vm = this;\r\n vm.checkDate = checkDate;\r\n vm.cancelOneBooking = cancelOneBooking;\r\n vm.checkTime = checkTime;\r\n vm.openBookingDetail = openBookingDetail;\r\n vm.openFutureBookingPopup = openFutureBookingPopup;\r\n vm.openBookingHistoryPopup = openBookingHistoryPopup;\r\n vm.loadMoreEarningsBookings = loadMoreEarningsBookings;\r\n vm.loadMoreUpComingBookings = loadMoreUpComingBookings;\r\n vm.backHomePage = backHomePage;\r\n vm.pageEarningsNo = 1;\r\n vm.pageEarningsSize = 10;\r\n vm.pageUpcomingNo = 1;\r\n vm.pageUpcomingSize = 10;\r\n vm.noEarningsHistory = false;\r\n vm.bookingStatus = bookingStatus;\r\n vm.formatDate = formatDate;\r\n active();\r\n function active() {\r\n getListBookings();\r\n }\r\n function loadMoreEarningsBookings(){\r\n if(vm.loadMoreEarningsBookingCount){\r\n vm.pageEarningsNo++;\r\n $rootScope.loading = true;\r\n CandidatePortalService.getCandidatePreviousBookings({\r\n PageNo: vm.pageEarningsNo,\r\n PageSize: vm.pageEarningsSize\r\n }).then(function (dataEarningsBookings) {\r\n $rootScope.loading = false;\r\n vm.earningsHistories = vm.earningsHistories.concat(dataEarningsBookings.data.result.items);\r\n vm.totalEarningsBookingsCount = dataEarningsBookings.data.result.totalCount;\r\n if (vm.earningsHistories.length >= vm.totalEarningsBookingsCount) {\r\n vm.loadMoreEarningsBookingCount = false;\r\n }\r\n },function(){\r\n $rootScope.loading = false;\r\n vm.loadMoreEarningsBookingCount = false;\r\n })\r\n }\r\n }\r\n function loadMoreUpComingBookings(){\r\n if (vm.loadMoreUpComingBookingCount) {\r\n vm.pageUpcomingNo++;\r\n $rootScope.loading = true;\r\n CandidatePortalService.getCandidateUpcomingBookings({\r\n PageNo: vm.pageUpcomingNo,\r\n PageSize: vm.pageUpcomingSize\r\n }).then(function (dataUpcomingBookings) {\r\n $rootScope.loading = false;\r\n vm.comingBookings = vm.comingBookings.concat(dataUpcomingBookings.data.result.items);\r\n vm.totalUpcomingBookingsCount = dataUpcomingBookings.data.result.totalCount;\r\n if (vm.comingBookings.length >= vm.totalUpcomingBookingsCount) {\r\n vm.loadMoreUpComingBookingCount = false;\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.loadMoreUpComingBookingCount = false;\r\n })\r\n }\r\n }\r\n function getListBookings() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getCandidatePreviousBookings({\r\n PageNo: vm.pageEarningsNo,\r\n PageSize: vm.pageEarningsSize\r\n }).then(function (dataEarningsBookings) {\r\n vm.earningsHistories = dataEarningsBookings.data.result.items;\r\n vm.totalEarningsBookingsCount = dataEarningsBookings.data.result.totalCount;\r\n vm.earningsTotalAmount = dataEarningsBookings.data.result.totalAmount;\r\n\r\n if (vm.earningsHistories.length == 0) {\r\n vm.noEarningsHistory = 'Nothing yet, but follow our tips and you will be topping up your income in no time';\r\n } else if(vm.earningsHistories.length < vm.totalEarningsBookingsCount){\r\n vm.loadMoreEarningsBookingCount = true;\r\n }\r\n CandidatePortalService.getCandidateUpcomingBookings({\r\n PageNo: vm.pageUpcomingNo,\r\n PageSize: vm.pageUpcomingSize\r\n }).then(function (dataUpcomingBookings) {\r\n vm.comingBookings = dataUpcomingBookings.data.result.items;\r\n vm.totalUpcomingBookingsCount = dataUpcomingBookings.data.result.totalCount;\r\n if (vm.comingBookings.length == 0) {\r\n vm.noUpcomingHistory = 'No booking';\r\n }else if (vm.comingBookings.length < vm.totalUpcomingBookingsCount) {\r\n vm.loadMoreUpComingBookingCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noUpcomingHistory = 'No booking';\r\n })\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noEarningsHistory = 'Nothing yet, but follow our tips and you will be topping up your income in not time';\r\n })\r\n }\r\n\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n\r\n function cancelOneBooking(id) {\r\n $state.go(CONFIG.routes.candidate.portal.cancelBooking, {'id': id});\r\n }\r\n\r\n function openFutureBookingPopup(booking) {\r\n CandidatePortalService.openFutureBookingModal(booking).then(function () {\r\n\r\n });\r\n }\r\n\r\n function openBookingHistoryPopup(booking) {\r\n CandidatePortalService.openBookingHistoryModal(booking).then(function () {\r\n\r\n });\r\n }\r\n\r\n function openBookingDetail(booking) {\r\n CandidatePortalService.openBookingDetail(booking).then(function () {\r\n\r\n });\r\n }\r\n function bookingStatus(status){\r\n var item = $filter('filter')(CONFIG.bookingStatus, status);\r\n return item[0].status;\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n function backHomePage(){\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('BookingRequestController', BookingRequestController);\r\n\r\n /** @ngInject */\r\n function BookingRequestController(CandidatePortalService, CONFIG ,CommonService, $filter, $state, $rootScope, $localStorage) {\r\n var vm = this;\r\n vm.acceptBooking = acceptBooking;\r\n vm.userCandidate = $localStorage.userProfile;\r\n vm.refuseBooking = refuseBooking;\r\n vm.checkDate = checkDate;\r\n vm.checkTime = checkTime;\r\n vm.formatDate = formatDate;\r\n vm.backHomePage = backHomePage;\r\n vm.listBookings = [];\r\n getListRequestBookings();\r\n function acceptBooking(bookingId) {\r\n $rootScope.loading = true;\r\n CandidatePortalService.acceptRequestBooking(bookingId).then(function (data) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.portal.wheelBooking, {'id': data.data.result.id});\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function getListRequestBookings() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getListRequestBookings().then(function (data) {\r\n $rootScope.loading = false;\r\n vm.listBookings = data.data.result;\r\n var checkAmendBooking = [];\r\n angular.forEach(data.data.result, function(item){\r\n angular.forEach(item.potentialCandidates,function(can){\r\n if(can.isAmend && vm.userCandidate.id == can.candidateId) {\r\n item.hasAmend = true; \r\n checkAmendBooking.push(item)\r\n }else{\r\n item.hasAmend = false;\r\n item.candidateType= CONFIG.candidateType.Main\r\n }\r\n })\r\n\r\n });\r\n if(checkAmendBooking.length > 0){\r\n vm.titleRequestBooking = vm.userCandidate.name + ', can you make the amended booking';\r\n }else{\r\n vm.titleRequestBooking = 'Great news ' + vm.userCandidate.name + ', you have the following booking requests';\r\n }\r\n if (vm.listBookings.length == 0) {\r\n vm.noListBookings = 'No List Booking Request';\r\n }\r\n return vm.listBookings;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.noListBookings = 'No List Booking Request';\r\n })\r\n }\r\n\r\n function refuseBooking(bookingId) {\r\n openReasonModal(bookingId);\r\n }\r\n\r\n function openReasonModal(bookingId) {\r\n CandidatePortalService.openReasonModal(bookingId)\r\n .then(function (data) {\r\n removeByAttr(vm.listBookings, 'id', bookingId);\r\n $rootScope.loading = true;\r\n CandidatePortalService.refuseRequestBookingWithReason(bookingId, data).then(function(){\r\n $state.go(CONFIG.routes.candidate.portal.bookingsHistory);\r\n $rootScope.loading = false;\r\n },function(error){\r\n $rootScope.loading = false;\r\n });\r\n });\r\n }\r\n\r\n function checkDate(startDate, endDate) {\r\n return CommonService.checkDate(startDate, endDate)\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n return CommonService.checkTime(startTime, endTime)\r\n }\r\n\r\n function removeByAttr(arr, attr, value) {\r\n var i = arr.length;\r\n while (i--) {\r\n if (arr[i]\r\n && arr[i].hasOwnProperty(attr)\r\n && (arguments.length > 2 && arr[i][attr] === value )) {\r\n\r\n arr.splice(i, 1);\r\n\r\n }\r\n }\r\n return arr;\r\n }\r\n function formatDate (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n function backHomePage(){\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n\t'use strict';\r\n\r\n\tangular\r\n\t\t.module('lx.candidate')\r\n\t\t.controller('BecomeEligibleForCareCandidateController', BecomeEligibleForCareCandidateController);\r\n\r\n\t/** @ngInject */\r\n\tfunction BecomeEligibleForCareCandidateController($rootScope, $state, $window, CONFIG, $localStorage, CandidatePortalService, careCandidatesFactory) {\r\n\r\n\t\tvar vm = this;\r\n\t\tvm.labourXchangeWebsite = LabourXchange.Website.LabourXchange.Site;\r\n\t\tvm.user = angular.copy($localStorage.userProfile);\r\n\t\tvm.step = 1;\r\n\t\tvm.eligibleForCareAnswers = {\r\n\t\t\tableToAssistMobility: null,\r\n\t\t\ttravelToHomes: null,\r\n\t\t\tcarryOutVarietyOfDuties: null,\r\n\t\t\tanyReasonUnsuitable: null,\r\n\t\t\tqualificationsInCare: null,\r\n\t\t\thighDependencyCareExperience: null,\r\n\t\t\tmediumDependencyCareExperience: null,\r\n\t\t};\r\n\t\tvm.backButtonLabel = 'Not for me thanks, back to portal';\r\n\t\tvm.nextButtonLabel = 'What are the questions';\r\n\r\n\t\tvm.back = back;\r\n\t\tvm.whatsTheProcess = whatsTheProcess;\r\n\t\tvm.next = next;\r\n\t\tvm.openUnsuitableForCarePopup = openUnsuitableForCarePopup;\r\n\t\tvm.openCareQualificationsUploadPopup = openCareQualificationsUploadPopup;\r\n\r\n\t\tif (vm.user) {\r\n\t\t\t$rootScope.loading = true;\r\n\r\n\t\t\tcareCandidatesFactory.getCurrent(vm.user.id)\r\n\t\t\t\t.then(\r\n\t\t\t\t\tfunction (careCandidate) {\r\n\t\t\t\t\t\tif (!careCandidate) {\r\n\t\t\t\t\t\t\tvm.careCandidate = {\r\n\t\t\t\t\t\t\t\tUser: {\r\n Id: vm.user.id\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tvm.careCandidate = careCandidate;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfunction (error) {\r\n\t\t\t\t\t\tconsole.log(error);\r\n\r\n\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\tfunction back() {\r\n\t\t\tswitch (vm.step) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t$state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tvm.step = 1;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tvm.step = 2;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tvm.step = 3;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tvm.step = 4;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tfunction whatsTheProcess() {\r\n\t\t\tvm.step = 1;\r\n\t\t\tchangeButtonLabels();\r\n\t\t}\r\n\r\n\t\tfunction next() {\r\n\t\t\tswitch (vm.step) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvm.step = 2;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tvm.step = 3;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tvm.step = 4;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tvm.step = 5;\r\n\t\t\t\t\tchangeButtonLabels();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t$rootScope.loading = true;\r\n\r\n\t\t\t\t\tcareCandidatesFactory.saveCareCandidate(vm.careCandidate)\r\n\t\t\t\t\t\t.then(\r\n\t\t\t\t\t\t\tfunction (careCandidate) {\r\n\t\t\t\t\t\t\t\tvm.careCandidate = careCandidate;\r\n\t\t\t\t\t\t\t\t$rootScope.loading = false;\r\n\r\n\t\t\t\t\t\t\t\t$state.go(CONFIG.routes.candidate.portal.workfaceProfile);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tfunction (error) {\r\n\t\t\t\t\t\t\t\t$rootScope.loading = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction changeButtonLabels() {\r\n\t\t\tswitch (vm.step) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvm.backButtonLabel = 'Not for me thanks, back to portal';\r\n\t\t\t\t\tvm.nextButtonLabel = 'What are the questions';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tvm.backButtonLabel = 'Back to previous page';\r\n\t\t\t\t\tvm.nextButtonLabel = 'A few more questions';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tvm.backButtonLabel = 'Back to previous page';\r\n\t\t\t\t\tvm.nextButtonLabel = 'Prior support experience';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tvm.backButtonLabel = 'Back to previous page';\r\n\t\t\t\t\tvm.nextButtonLabel = 'Lets start training';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tvm.backButtonLabel = 'Back to previous page';\r\n\t\t\t\t\tvm.nextButtonLabel = 'Finish';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tvm.backButtonLabel = 'Back to previous page';\r\n\t\t\t\t\tvm.nextButtonLabel = 'Finish';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction openUnsuitableForCarePopup() {\r\n\t\t\tCandidatePortalService.openUnsuitableForCareModal().then(function () {\r\n\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction openCareQualificationsUploadPopup() {\r\n\t\t\tCandidatePortalService.openCareQualificationsUploadModal().then(function () {\r\n\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('AvailabilityController', AvailabilityController);\r\n\r\n /** @ngInject */\r\n function AvailabilityController(User, dataList, $state,CommonService, $localStorage,CONFIG, CandidatePortalService, $rootScope, SignupCandidateService) {\r\n\r\n var vm = this;\r\n vm.profileForm1 = [];\r\n vm.userCandidate = $localStorage.userProfile ? angular.copy($localStorage.userProfile) : {};\r\n vm.userCandidateTemp = angular.copy(vm.userCandidate);\r\n vm.userCandidate.availableDayTimes = !vm.userCandidate.id ? [] : vm.userCandidate.availableDayTimes;\r\n vm.timePickerOptions = CONFIG.timePickerOptions\r\n vm.dateOptions = CONFIG.dateOptions;\r\n vm.availableTemp = [];\r\n vm.updateAvailability = updateAvailability;\r\n vm.formatDate = formatDate;\r\n vm.timePickerDefault = CONFIG.timePickerDefault;\r\n vm.availableDayTimes =\r\n [\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(1),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(1),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(2),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(2),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(3),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(3),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(4),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(4),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(5),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(5),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(6),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(6),\r\n isSelected: false\r\n },\r\n {\r\n startTime: moment(vm.timePickerDefault.startTime).isoWeekday(7),\r\n endTime: moment(vm.timePickerDefault.endTime).isoWeekday(7),\r\n isSelected: false\r\n }\r\n ];\r\n vm.getDateOfWeek = getDateOfWeek;\r\n vm.onChangeTimeTo = onChangeTimeTo;\r\n vm.onChangeTimeFrom = onChangeTimeFrom;\r\n\r\n activate();\r\n\r\n //Functions\r\n function checkDateSelected() {\r\n if (vm.userCandidate.availableDayTimes.length > 0) {\r\n angular.forEach(vm.userCandidate.availableDayTimes, function (userDate) {\r\n var dayOfWeek = moment(userDate.startTime).isoWeekday();\r\n vm.availableDayTimes[dayOfWeek - 1] = {\r\n startTime: moment(userDate.startTime),\r\n endTime: moment(userDate.endTime),\r\n isSelected: true\r\n };\r\n\r\n });\r\n }\r\n }\r\n\r\n function getDateOfWeek(d) {\r\n return CommonService.getDateOfWeek(d)\r\n }\r\n\r\n function onChangeTimeTo(available) {\r\n if (available.startTime >= available.endTime) {\r\n var endTime = moment(available.endTime);\r\n available.startTime = endTime.minute(endTime.minute() - 15);\r\n }\r\n }\r\n\r\n function onChangeTimeFrom(available) {\r\n if (available.startTime >= available.endTime) {\r\n var startTime = moment(available.startTime);\r\n available.endTime = startTime.minute(startTime.minute() + 15);\r\n }\r\n }\r\n\r\n function activate() {\r\n getTypeOfWork();\r\n checkDateSelected();\r\n getDayTimeMostSearchByClient();\r\n }\r\n\r\n function getDayTimeMostSearchByClient() {\r\n $rootScope.loading = true;\r\n CandidatePortalService.getDayTimeMostSearchByClient().then(function (data) {\r\n $rootScope.loading = false;\r\n vm.dayTimeMost = data.data.result;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function updateAvailability() {\r\n vm.userCandidate.availableDayTimes = [];\r\n angular.forEach(vm.availableDayTimes, function (check) {\r\n if (check.isSelected) {\r\n vm.userCandidate.availableDayTimes.push(\r\n {\r\n startTime: moment(check.startTime).format(CONFIG.timeFormat),\r\n endTime: moment(check.endTime).format(CONFIG.timeFormat)\r\n }\r\n );\r\n }\r\n });\r\n $rootScope.loading = true;\r\n SignupCandidateService.updateCandidateUserProfile(vm.userCandidate).then(function (data) {\r\n User.get().$promise.then(function (resp) {\r\n $rootScope.loading = false;\r\n $localStorage.userProfile = resp.result.user;\r\n $localStorage.searchFilter = resp.result.user;\r\n goWorkfaceProfile();\r\n });\r\n //$localStorage.userProfile = data.data.result;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function goWorkfaceProfile() {\r\n if ($state.params.type === 'signup') {\r\n $state.go(CONFIG.routes.candidate.signup.step6)\r\n } else {\r\n $state.go(CONFIG.routes.candidate.portal.workfaceProfile)\r\n }\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function formatDate(d) {\r\n return CommonService.formatDate(d)\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('AlreadyToGoAndEarnExtraController', AlreadyToGoAndEarnExtraController);\r\n\r\n /** @ngInject */\r\n function AlreadyToGoAndEarnExtraController($state, $window, CONFIG, $localStorage) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.goPortal = goPortal;\r\n function goPortal() {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\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('lx', [\r\n 'mgo-angular-wizard',\r\n 'ngAnimate',\r\n 'ngCookies',\r\n 'ngTouch',\r\n 'ngSanitize',\r\n 'ngMessages',\r\n 'ngAria',\r\n 'ngResource',\r\n 'ui.router',\r\n 'ui.bootstrap',\r\n 'ngToast',\r\n 'slick',\r\n 'ui.select',\r\n 'angular.chosen',\r\n 'ui.mask',\r\n 'ngFileUpload',\r\n 'multi-select-tree',\r\n 'ngStorage',\r\n 'ngIntlTelInput',\r\n 'imageCropper',\r\n 'ui.timepicker',\r\n 'ng.deviceDetector',\r\n 'vjs.video',\r\n 'duScroll',\r\n 'ngFileSaver',\r\n 'angular-cookie-law',\r\n 'textAngular',\r\n 'lx.candidate',\r\n 'lx.client',\r\n 'lx.common',\r\n 'lx.admin',\r\n 'lx.corporate'\r\n ]);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('JobsController', JobsController);\r\n\r\n /** @ngInject */\r\n function JobsController($rootScope, JobService) {\r\n var vm = this;\r\n vm.job = [];\r\n active();\r\n\r\n function active() {\r\n getPublishedJobs();\r\n }\r\n\r\n function getPublishedJobs() {\r\n $rootScope.loading = true;\r\n\r\n JobService.getPublishedJobs().then(function (res) {\r\n $rootScope.loading = false;\r\n vm.jobs = res.data.result.items;\r\n }, function () {\r\n vm.job = [];\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('lx')\r\n .controller('JobController', JobController);\r\n\r\n /** @ngInject */\r\n function JobController($rootScope, $state, CONFIG, JobService) {\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.job = {};\r\n vm.errorMessage = null;\r\n\r\n vm.goToApplyHere = goToApplyHere;\r\n\r\n active();\r\n\r\n function goToApplyHere() {\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n\r\n function active() {\r\n getJob();\r\n }\r\n\r\n function getJob() {\r\n $rootScope.loading = true;\r\n\r\n JobService.getJobByUrl($state.params.url).then(function (res) {\r\n $rootScope.loading = false;\r\n vm.job = res.data.result;\r\n\r\n if (vm.job) $rootScope.activeTab = CONFIG.activeTab.jobs;\r\n \r\n }, function (error) {\r\n vm.errorMessage = error.data.exceptionMessage;\r\n $rootScope.loading = false;\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('lx')\r\n .directive('validateFile', validateFile);\r\n\r\n function validateFile() {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, elem, attrs, ngModel) {\r\n var validFormats = ['jpg','jpeg','png','pdf'];\r\n elem.bind('change', function () {\r\n validImage(false);\r\n scope.$apply(function () {\r\n ngModel.$render();\r\n });\r\n });\r\n ngModel.$render = function () {\r\n ngModel.$setViewValue(elem.val());\r\n };\r\n function validImage(bool) {\r\n ngModel.$setValidity('extension', bool);\r\n }\r\n ngModel.$parsers.push(function(value) {\r\n var index = value.lastIndexOf(\".\");\r\n var ext = value.substring(index, value.length);\r\n if(ext=='') return;\r\n if(validFormats.indexOf(ext) == -1){\r\n return value;\r\n }\r\n validImage(true);\r\n return value;\r\n });\r\n }\r\n };\r\n }\r\n})();\n(function () {\r\n \"use strict\";\r\n\r\n angular\r\n .module('lx')\r\n .directive('videoCustom', videoCustom);\r\n\r\n function videoCustom($rootScope, detectUtils, CONFIG) {\r\n\r\n return {\r\n restrict: 'EA',\r\n template: '',\r\n scope: {\r\n src: '=?',\r\n type: '=?',\r\n link: '=?',\r\n poster: '=?'\r\n\r\n },\r\n link: link\r\n };\r\n\r\n function link(scope, element, attrs, model) {\r\n scope.url = scope.link ? scope.link + '/' + scope.src : scope.src;\r\n scope.media = {\r\n sources: [\r\n {\r\n src: scope.link ? scope.link + '/' + scope.src : scope.src,\r\n type: scope.type\r\n }\r\n ],\r\n poster: scope.poster ? scope.link + '/' + scope.poster : ''\r\n };\r\n scope.options = {};\r\n if (detectUtils.isMobile()) {\r\n scope.$on('vjsVideoReady', function (e, data) {\r\n data.vid.on('play', function () {\r\n this.bigPlayButton.hide();\r\n this.controlBar.show();\r\n });\r\n data.vid.on('pause', function () {\r\n this.bigPlayButton.show();\r\n this.controlBar.show();\r\n });\r\n });\r\n } else {\r\n scope.$on('vjsVideoReady', function (e, data) {\r\n\r\n\r\n data.vid.on('play', function () {\r\n this.bigPlayButton.hide();\r\n this.controlBar.hide();\r\n });\r\n data.vid.on('pause', function () {\r\n this.bigPlayButton.show();\r\n this.controlBar.hide();\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('lx')\r\n .directive('postcodeAutocomplete', postcodeAutocomplete)\r\n .directive('postcodeAutocompleteCustom', postcodeAutocompleteCustom);\r\n\r\n function postcodeAutocomplete($rootScope, $timeout) {\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n scope: {\r\n ngModel: \"=\",\r\n postCode: '=?',\r\n lat: '=?',\r\n lng: '=?',\r\n town: '=?',\r\n county: '=?',\r\n country: '=?',\r\n shortAddressLine: '=?',\r\n frm: '=',\r\n\r\n },\r\n link: link\r\n };\r\n\r\n function link(scope, element, attrs, model) {\r\n var options = {\r\n types: ['(regions)'],\r\n componentRestrictions: {'country': 'uk'}\r\n };\r\n if (!scope.postCode) {\r\n model.$invalid = true;\r\n }\r\n $rootScope.geocode = {};\r\n listenPlaceChange();\r\n scope.$watch(\r\n function () {\r\n return model.$modelValue;\r\n }, function (newValue, oldValue) {\r\n if (newValue !== oldValue) {\r\n scope.postCode = null;\r\n }\r\n }, true);\r\n element.blur(function () {\r\n listenPlaceChange();\r\n if (!scope.postCode) {\r\n model.$invalid = true;\r\n model.$setValidity(\"invalid\", false);\r\n }\r\n })\r\n element.focus(function () {\r\n })\r\n\r\n function listenPlaceChange() {\r\n var geocoder = new google.maps.Geocoder();\r\n var autocomplete = new google.maps.places.Autocomplete(element[0], options);\r\n google.maps.event.addListener(autocomplete, 'place_changed', function () {\r\n\r\n var place = autocomplete.getPlace();\r\n if (place['geometry'] && place['geometry']['location']) {\r\n var lat = place['geometry']['location'].lat();\r\n var lng = place['geometry']['location'].lng();\r\n var latlng = new google.maps.LatLng(lat, lng);\r\n $timeout(function () {\r\n geocoder.geocode({'latLng': latlng}, function (results) {\r\n if (results\r\n && results.length > 0\r\n && results[0].address_components\r\n && results[0].address_components.length > 0) {\r\n results[0].address_components.forEach(function (address) {\r\n\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_town') >= 0) {\r\n var townName = address.long_name;\r\n scope.$apply(function () {\r\n scope.town = townName;\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n var countyName = address.long_name;\r\n scope.$apply(function () {\r\n scope.county = countyName;\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n var country = address.long_name;\r\n scope.$apply(function () {\r\n scope.country = country;\r\n });\r\n }\r\n });\r\n var postCode = getPostCode(results);\r\n scope.$apply(function () {\r\n scope.postCode = postCode;\r\n model.$setValidity(\"invalid\", true);\r\n });\r\n scope.$apply(function () {\r\n scope.shortAddressLine = getShortAddressLine(element.val(), results[0].address_components, postCode);\r\n });\r\n\r\n }\r\n })\r\n }, 0)\r\n $timeout(function () {\r\n scope.lat = lat;\r\n scope.lng = lng;\r\n model.$setViewValue(element.val());\r\n }, 0)\r\n }\r\n })\r\n }\r\n\r\n function getShortAddressLine(address, address_components, postCode) {\r\n var words = address.replace(',', ' ').split(' ');\r\n words = words.filter(function (x) {\r\n return x != '';\r\n })\r\n if (postCode) {\r\n var postCodeSplit = postCode.split(' ');\r\n words = words.filter(function (x) {\r\n return postCodeSplit.indexOf(x) < 0;\r\n })\r\n }\r\n address_components.forEach(function (address) {\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', ''));\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != abbrevName(address.long_name.toLowerCase()).replace(' ', ''));\r\n });\r\n }\r\n });\r\n var addressLine = words.join(\" \");\r\n address_components.forEach(function (address) {\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_code') >= 0) {\r\n var splitWords = address.long_name.split(' ');\r\n splitWords.forEach(function (item) {\r\n addressLine = addressLine.replace(item, '');\r\n })\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_town') >= 0) {\r\n addressLine = addressLine.replace(address.long_name, '');\r\n addressLine = addressLine.replace(address.short_name, '');\r\n }\r\n });\r\n return addressLine;\r\n }\r\n\r\n function abbrevName(str1) {\r\n var split_names = str1.trim().split(\" \");\r\n if (split_names.length > 1) {\r\n return (split_names[0].charAt(0) + split_names[1].charAt(0));\r\n }\r\n return split_names[0];\r\n };\r\n\r\n function getPostCode(results) {\r\n for (var i = 0; i < results.length; i++) {\r\n for (var j = 0; j < results[i].address_components.length; j++) {\r\n for (var k = 0; k < results[i].address_components[j].types.length; k++) {\r\n if (results[i].address_components[j].types[k] == \"postal_code\") {\r\n if (results[i].address_components[j].long_name.length > 4) {\r\n return results[i].address_components[j].long_name;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n function postcodeAutocompleteCustom($rootScope, $timeout) {\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n scope: {\r\n ngModel: \"=\",\r\n street: '=?',\r\n lat: '=?',\r\n lng: '=?',\r\n town: '=?',\r\n county: '=?',\r\n country: '=?'\r\n\r\n },\r\n link: link\r\n };\r\n\r\n function link(scope, element, attrs, model) {\r\n var options = {\r\n types: ['(regions)'],\r\n componentRestrictions: {'country': 'uk'}\r\n };\r\n $rootScope.geocode = {};\r\n listenPlaceChange();\r\n\r\n function listenPlaceChange() {\r\n var geocoder = new google.maps.Geocoder();\r\n var autocomplete = new google.maps.places.Autocomplete(element[0], options);\r\n google.maps.event.addListener(autocomplete, 'place_changed', function () {\r\n\r\n var place = autocomplete.getPlace();\r\n if (place['geometry'] && place['geometry']['location']) {\r\n var lat = place['geometry']['location'].lat();\r\n var lng = place['geometry']['location'].lng();\r\n var latlng = new google.maps.LatLng(lat, lng);\r\n var street='';\r\n geocoder.geocode({'latLng': latlng}, function (results) {\r\n if (results\r\n && results.length > 0\r\n && results[0].address_components\r\n && results[0].address_components.length > 0) {\r\n results[0].address_components.forEach(function (address) {\r\n\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('street_number') >= 0) {\r\n street = address.long_name;\r\n scope.$apply(function () {\r\n scope.street = street;\r\n });\r\n }\r\n\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('route') >= 0) {\r\n var route = address.long_name;\r\n scope.$apply(function () {\r\n scope.street = street + ' ' + route;\r\n });\r\n }\r\n\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_town') >= 0) {\r\n var townName = address.long_name;\r\n scope.$apply(function () {\r\n scope.town = townName;\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n var countyName = address.long_name;\r\n scope.$apply(function () {\r\n scope.county = countyName;\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n var country = address.long_name;\r\n scope.$apply(function () {\r\n scope.country = country;\r\n });\r\n }\r\n });\r\n var postCode = getPostCode(results);\r\n scope.$apply(function () {\r\n scope.ngModel = postCode;\r\n });\r\n scope.$apply(function () {\r\n model.$setViewValue(postCode);\r\n });\r\n\r\n }\r\n })\r\n $timeout(function () {\r\n scope.lat = lat;\r\n scope.lng = lng;\r\n }, 0)\r\n }\r\n })\r\n }\r\n\r\n function getPostCode(results) {\r\n for (var i = 0; i < results.length; i++) {\r\n for (var j = 0; j < results[i].address_components.length; j++) {\r\n for (var k = 0; k < results[i].address_components[j].types.length; k++) {\r\n if (results[i].address_components[j].types[k] == \"postal_code\") {\r\n if (results[i].address_components[j].long_name.length > 4) {\r\n return results[i].address_components[j].long_name;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n \"use strict\";\r\n\r\n angular\r\n .module('lx')\r\n .filter('limitHtml', limitHtml);\r\n\r\n function limitHtml() {\r\n\r\n return function(text, limit) {\r\n\r\n var changedString = String(text).replace(/<[^>]+>/gm, '');\r\n var length = changedString.length;\r\n var suffix = ' ...';\r\n\r\n return length > limit ? changedString.substr(0, limit - 1) + suffix : changedString;\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .directive('toggleSelectClickInput', toggleSelectClickInput);\n\n toggleSelectClickInput.$inject = ['$timeout'];\n\n function toggleSelectClickInput($timeout) {\n return {\n require: 'uiSelect',\r\n link: function (scope, element, attrs, $select) {\r\n element.bind('click', function () {\r\n\r\n //$timeout(function () {\r\n // $(element).find('input').click();\r\n //});\n\n $select.activate();\r\n });\r\n }\r\n };\r\n }\n})();\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .factory('ToastMessageService', ToastMessageService);\r\n\r\n /** @ngInject */\r\n function ToastMessageService($uibModal, CONFIG, $http) {\r\n return {\r\n openPopupMessageModal: openPopupMessageModal,\r\n openAmendRefusedPopupMessageModal: openAmendRefusedPopupMessageModal,\r\n openCandidateCancelledPopupMessageModal: openCandidateCancelledPopupMessageModal,\r\n openClientCancelledPopupMessageModal: openClientCancelledPopupMessageModal,\r\n openClientCancelledPopupBeforePaymentMessageModal: openClientCancelledPopupBeforePaymentMessageModal,\r\n closedNotification: closedNotification,\r\n closedNotifications: closedNotifications\r\n };\r\n function openPopupMessageModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/toastMessage/modal/popupMessage.html',\r\n controller: 'PopupMessageController',\r\n controllerAs: 'vm',\r\n resolve: {},\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openAmendRefusedPopupMessageModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/toastMessage/modal/amendRefusedPopupMessage.html',\r\n controller: 'AmendRefusedPopupMessageController',\r\n controllerAs: 'vm',\r\n resolve: {},\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openCandidateCancelledPopupMessageModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/toastMessage/modal/candidateCancelledPopupMessage.html',\r\n controller: 'CandidateCancelledMessageController',\r\n controllerAs: 'vm',\r\n resolve: {},\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openClientCancelledPopupMessageModal(notification) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/toastMessage/modal/clientCancelledPopupMessage.html',\r\n controller: 'ClientCancelledMessageController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n notification: notification\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openClientCancelledPopupBeforePaymentMessageModal(notification) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/components/toastMessage/modal/clientCancelledPopupBeforePaymentMessageModal.html',\r\n controller: 'ClientCancelledPopupBeforePaymentMessageController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n notification: notification\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function closedNotification(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.closedNotification + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n function closedNotifications(ids) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.closedNotifications,\r\n data:ids\r\n };\r\n return $http(req);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n \"use strict\";\r\n\r\n angular\r\n .module('lx')\r\n .directive('lxToastMessage', lxToastMessage)\r\n .directive('compile', ['$compile', function ($compile) {\r\n return function (scope, element, attrs) {\r\n scope.$watch(\r\n function (scope) {\r\n return scope.$eval(attrs.compile);\r\n },\r\n function (value) {\r\n element.html(value);\r\n $compile(element.contents())(scope);\r\n }\r\n );\r\n };\r\n }]);\r\n\r\n function lxToastMessage($rootScope,CONFIG, $uibModal, $interval, ClientPortalService, CandidatePortalService, $state, ToastMessageService, $localStorage) {\r\n\r\n return {\r\n restrict: 'EA',\r\n link: link,\r\n template: '
'\r\n };\r\n function link(scope, element) {\r\n scope.message = null;\r\n scope.isShow = false;\r\n scope.selectedNotification = null;\r\n scope.selectedAmendRefuseNotification = null;\r\n scope.selectedCandidateCancelledNotification = null;\r\n scope.openNoResponsePopup = openNoResponsePopup;\r\n scope.openAmendRefusedPopup = openAmendRefusedPopup;\r\n scope.close = close;\r\n scope.openCandidateCancelledPopup = openCandidateCancelledPopup;\r\n scope.openClientCancelledPopup = openClientCancelledPopup;\r\n scope.openClientCancelledPopupBeforePayment = openClientCancelledPopupBeforePayment;\r\n scope.closeNotification = closeNotification;\r\n var promise;\r\n scope.start = function () {\r\n if($rootScope.candidateNote) { $rootScope.candidateNote = null };\r\n if($rootScope.clientNote) { $rootScope.clientNote = null } ;\r\n if(!$rootScope.candidateNote && !$rootScope.clientNote ){\r\n promise = $interval(getNotifications, 20000);\r\n }\r\n\r\n };\r\n scope.stop = function(){\r\n clearInterval(promise)\r\n }\r\n if ($localStorage.selectedNotification) {\r\n scope.selectedNotification = $localStorage.selectedNotification;\r\n }\r\n if ($localStorage.selectedAmendRefuseNotification) {\r\n scope.selectedAmendRefuseNotification = $localStorage.selectedAmendRefuseNotification;\r\n }\r\n if ($localStorage.selectedCandidateCancelledNotification) {\r\n scope.selectedCandidateCancelledNotification = $localStorage.selectedCandidateCancelledNotification;\r\n }\r\n if ($localStorage.selectedClientCancelledNotification) {\r\n scope.selectedClientCancelledNotification = $localStorage.selectedClientCancelledNotification;\r\n }\r\n function getNotifications() {\r\n if (!$localStorage.userProfile){\r\n scope.stop();\r\n }else{\r\n if (((scope.state != null && scope.state.indexOf(CONFIG.routes.candidate.portal.main) >= 0) || $state.current.name.indexOf(CONFIG.routes.candidate.portal.main) >= 0) && $localStorage.userProfile.roleName == CONFIG.userRoles.candidate) {\r\n CandidatePortalService.getNotifications().then(function (res) {\r\n scope.notifications = res.data.result.items;\r\n if ($state.current.name.indexOf(CONFIG.routes.candidate.portal.main) >= 0) {\r\n showNotifications();\r\n }\r\n },function(){\r\n scope.state = null\r\n scope.stop();\r\n });\r\n }\r\n if (((scope.state != null && scope.state.indexOf(CONFIG.routes.client.portal.main) >= 0) || $state.current.name.indexOf(CONFIG.routes.client.portal.main) >= 0) && $localStorage.userProfile.roleName == CONFIG.userRoles.client ) {\r\n ClientPortalService.getNotifications().then(function (res) {\r\n scope.notifications = res.data.result.items;\r\n if ($state.current.name.indexOf(CONFIG.routes.client.portal.main) >= 0) {\r\n showNotifications();\r\n }\r\n\r\n },function(){\r\n scope.state = null\r\n scope.stop();\r\n });\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function showNotifications() {\r\n if (scope.selectedNotification) {\r\n $localStorage.selectedNotification = scope.selectedNotification;\r\n scope.notifications = scope.notifications.filter(function (notification) {\r\n return !(notification.type === scope.selectedNotification.type && scope.selectedNotification.isClose == true && scope.selectedNotification.bookingId == notification.bookingId)\r\n });\r\n }\r\n if (scope.selectedAmendRefuseNotification) {\r\n $localStorage.selectedAmendRefuseNotification = scope.selectedAmendRefuseNotification;\r\n scope.notifications = scope.notifications.filter(function (notification) {\r\n return !(notification.type === scope.selectedAmendRefuseNotification.type && scope.selectedAmendRefuseNotification.isClose == true && scope.selectedAmendRefuseNotification.bookingId == notification.bookingId)\r\n });\r\n }\r\n if (scope.selectedCandidateCancelledNotification) {\r\n $localStorage.selectedCandidateCancelledNotification = scope.selectedCandidateCancelledNotification;\r\n scope.notifications = scope.notifications.filter(function (notification) {\r\n return !(notification.type === scope.selectedCandidateCancelledNotification.type && scope.selectedCandidateCancelledNotification.isClose == true && scope.selectedCandidateCancelledNotification.bookingId == notification.bookingId)\r\n });\r\n }\r\n if (scope.selectedClientCancelledNotification) {\r\n $localStorage.selectedClientCancelledNotification = scope.selectedClientCancelledNotification;\r\n scope.notifications = scope.notifications.filter(function (notification) {\r\n return !(notification.type === scope.selectedClientCancelledNotification.type && scope.selectedClientCancelledNotification.isClose == true && scope.selectedClientCancelledNotification.bookingId == notification.bookingId)\r\n });\r\n }\r\n if (scope.selectedClientCloseNotification) {\r\n $localStorage.selectedClientCloseNotification = scope.selectedClientCloseNotification;\r\n scope.notifications = scope.notifications.filter(function (notification) {\r\n return !(notification.type === scope.selectedClientCloseNotification.type && scope.selectedClientCloseNotification.isClose == true && scope.selectedClientCloseNotification.bookingId == notification.bookingId)\r\n });\r\n }\r\n if (scope.notifications.length == 0) {\r\n if ((scope.state != null && scope.state.indexOf(CONFIG.routes.client.portal.main) >= 0) || $state.current.name.indexOf(CONFIG.routes.client.portal.main) >= 0) {\r\n scope.notifications = [{ message : 'For info and tips on how best to use your portal and search for staff visit our FAQ' }]\r\n }\r\n scope.isShow = true\r\n }else{\r\n scope.isShow = true\r\n }\r\n }\r\n\r\n function close() {\r\n scope.isShow = false\r\n }\r\n\r\n function openNoResponsePopup(notification) {\r\n scope.selectedNotification = notification;\r\n ToastMessageService.openPopupMessageModal().then(function () {\r\n scope.selectedNotification.isClose = true;\r\n ToastMessageService.closedNotification(notification.bookingId);\r\n showNotifications();\r\n })\r\n }\r\n\r\n function openAmendRefusedPopup(notification) {\r\n scope.selectedAmendRefuseNotification = notification;\r\n ToastMessageService.openAmendRefusedPopupMessageModal().then(function () {\r\n scope.selectedAmendRefuseNotification.isClose = true;\r\n ToastMessageService.closedNotification(notification.bookingId);\r\n showNotifications();\r\n })\r\n }\r\n\r\n function openCandidateCancelledPopup(notification) {\r\n scope.selectedCandidateCancelledNotification = notification;\r\n ToastMessageService.openCandidateCancelledPopupMessageModal().then(function () {\r\n scope.selectedCandidateCancelledNotification.isClose = true;\r\n ToastMessageService.closedNotification(notification.bookingId);\r\n showNotifications();\r\n })\r\n }\r\n function openClientCancelledPopupBeforePayment(notification) {\r\n scope.selectedCandidateCancelledNotification = notification;\r\n ToastMessageService.openClientCancelledPopupBeforePaymentMessageModal(notification).then(function () {\r\n scope.selectedCandidateCancelledNotification.isClose = true;\r\n ToastMessageService.closedNotification(notification.bookingId);\r\n showNotifications();\r\n })\r\n }\r\n\r\n function openClientCancelledPopup(notification) {\r\n scope.selectedClientCancelledNotification = notification;\r\n ToastMessageService.openClientCancelledPopupMessageModal(notification).then(function () {\r\n scope.selectedClientCancelledNotification.isClose = true;\r\n ToastMessageService.closedNotification(notification.bookingId);\r\n showNotifications();\r\n })\r\n }\r\n function closeNotification(notification){\r\n scope.selectedClientCloseNotification = notification;\r\n ToastMessageService.closedNotifications(notification.bookingIds).then(function () {\r\n scope.selectedClientCloseNotification.isClose = true;\r\n showNotifications();\r\n $state.go(CONFIG.routes.client.portal.bookingsInformation);\r\n })\r\n }\r\n\r\n $rootScope.$on(\"$stateChangeStart\", function (event, toState, toParams, fromState, fromParams) {\r\n var state = toState.name;\r\n scope.state = state;\r\n if (state.indexOf(CONFIG.routes.candidate.portal.main) >= 0 || state.indexOf(CONFIG.routes.client.portal.main) >= 0) {\r\n if($rootScope.candidateNote) {\r\n scope.notifications = $rootScope.candidateNote;\r\n showNotifications()\r\n scope.isShow = true;\r\n };\r\n if($rootScope.clientNote) {\r\n scope.notifications = $rootScope.clientNote;\r\n showNotifications()\r\n scope.isShow = true;\r\n };\r\n if(!promise){\r\n scope.start();\r\n }\r\n } else {\r\n if(promise){\r\n scope.stop();\r\n }\r\n scope.isShow = 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 var _signaturePad = null;\r\n\r\n angular\r\n .module('lx')\r\n .directive('signaturePad', signaturePad)\r\n .factory('signaturePadFactory', signaturePadFactory);\r\n\r\n signaturePad.$inject = ['$window'];\r\n\r\n function signaturePad($window) {\r\n var directive = {\r\n restrict: 'E',\r\n require: 'ngModel',\r\n scope: {\r\n ngModel: '=',\r\n formContainer: '=',\r\n errorClass: '=',\r\n disabled: '='\r\n },\r\n\t\t\ttemplateUrl: 'app/components/signature-pad/signature-pad.directive.html',\r\n link: function (scope, element, attributes, controller) {\r\n var wrapper = document.getElementById(\"signature-pad\"),\r\n\r\n canvas = wrapper.querySelector(\"canvas\");\r\n\r\n function resizeCanvas() {\r\n // When zoomed out to less than 100%, for some very strange reason,\r\n // some browsers report devicePixelRatio as less than 1\r\n // and only part of the canvas is cleared then.\r\n\r\n var ratio = Math.max(window.devicePixelRatio || 1, 1);\r\n var width = canvas.offsetWidth * ratio;\r\n var height = canvas.offsetHeight * ratio;\r\n canvas.width = width;\r\n canvas.height = height;\r\n canvas.getContext(\"2d\").scale(ratio, ratio);\r\n if (!scope.disabled) _signaturePad.clear();\r\n\r\n if (scope.ngModel) {\r\n var ctx = canvas.getContext(\"2d\");\r\n\r\n var image = new Image();\r\n image.onload = function () {\r\n if (image.width === 0) image.width = canvas.offsetWidth;\r\n if (image.height === 0) image.height = canvas.offsetHeight;\r\n ctx.drawImage(image, 0, 0, canvas.offsetWidth, canvas.offsetHeight);\r\n };\r\n image.src = scope.ngModel;\r\n image.width = canvas.offsetWidth;\r\n image.height = canvas.offsetHeight;\r\n }\r\n }\r\n\r\n var watcher = scope.$watch(\r\n function () {\r\n var wrapper = document.getElementById(\"signature-pad\"),\r\n\r\n canvas = wrapper.querySelector(\"canvas\");\r\n\r\n var ratio = Math.max(window.devicePixelRatio || 1, 1);\r\n var width = canvas.offsetWidth * ratio;\r\n var height = canvas.offsetHeight * ratio;\r\n canvas.width = width;\r\n canvas.height = height;\r\n canvas.getContext(\"2d\").scale(ratio, ratio);\r\n if (!scope.disabled) _signaturePad.clear();\r\n\r\n if (scope.ngModel) {\r\n var ctx = canvas.getContext(\"2d\");\r\n\r\n var image = new Image();\r\n image.onload = function () {\r\n ctx.drawImage(image, 0, 0, canvas.offsetWidth, canvas.offsetHeight);\r\n };\r\n image.src = scope.ngModel;\r\n image.width = canvas.offsetWidth;\r\n image.height = canvas.offsetHeight;\r\n }\r\n\r\n if (canvas.offsetWidth > 0 && canvas.offsetHeight > 0) watcher();\r\n }\r\n );\r\n\r\n if(!scope.disabled) _signaturePad = new SignaturePad(canvas);\r\n\r\n window.addEventListener('resize', resizeCanvas);\r\n //resizeCanvas();\r\n\r\n canvas.addEventListener('touchend', function () {\r\n controller.$setViewValue(_signaturePad.toDataURL());\r\n });\r\n\r\n canvas.addEventListener('mouseup', function () {\r\n controller.$setViewValue(_signaturePad.toDataURL());\r\n });\r\n\r\n scope.hasError = function () {\r\n if (scope.formContainer && scope.formContainer.$submitted && !scope.ngModel) {\r\n return scope.errorClass;\r\n }\r\n\r\n return '';\r\n }\r\n }\r\n };\r\n return directive;\r\n }\r\n\r\n function signaturePadFactory() {\r\n var service = {\r\n initialise: initialise,\r\n clear: clear,\r\n disable: disable\r\n };\r\n\r\n return service;\r\n\r\n function initialise() {\r\n if (!_signaturePad) {\r\n var wrapper = document.getElementById(\"signature-pad\"),\r\n\r\n canvas = wrapper.querySelector(\"canvas\");\r\n\r\n _signaturePad = new SignaturePad(canvas);\r\n }\r\n }\r\n\r\n function clear() {\r\n if (_signaturePad) _signaturePad.clear();\r\n }\r\n\r\n function disable() {\r\n _signaturePad = null;\r\n }\r\n }\r\n})();\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .factory('UserRoleService', UserRoleService);\r\n\r\n /** @ngInject */\r\n\r\n function UserRoleService($http, CONFIG) {\r\n return {\r\n getRoleByName: getRoleByName\r\n };\r\n\r\n function getRoleByName(name) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.role.getByName + \"?name=\" + name;\r\n return $http.post(url, {});\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .factory('User', userService);\r\n\r\n /** @ngInject */\r\n\r\n function userService($resource, CONFIG) {\r\n return $resource(CONFIG.rest.baseURI + 'services/app/user/:action', {}, {\r\n get:{\r\n method: 'POST',\r\n params: {\r\n action:'GetUserProfile'\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('lx')\r\n .factory('dataList', dataListFactory);\r\n\r\n /** @ngInject */\r\n\r\n function dataListFactory(CONFIG, $http, $q, $cacheFactory) {\r\n return {\r\n getKeySkills: getKeySkills,\r\n getWorkTypes: getWorkTypes,\r\n getKeyExperiences: getKeyExperiences,\r\n getEmploymentStatuses: getEmploymentStatuses,\r\n getBusinessTypes: getBusinessTypes,\r\n getTransportationModes: getTransportationModes\r\n };\r\n function getKeySkills() {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getSkills)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getSkills)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getSkills, {cache: true});\r\n }\r\n\r\n function getWorkTypes() {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getWorkTypes)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getWorkTypes)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getWorkTypes, {cache: true})\r\n }\r\n\r\n function getKeyExperiences() {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getKeyExperiences)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getKeyExperiences)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getKeyExperiences, {cache: true})\r\n }\r\n\r\n function getEmploymentStatuses() {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getEmploymentStatuses)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getEmploymentStatuses)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getEmploymentStatuses, {cache: true})\r\n }\r\n\r\n function getBusinessTypes() {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getBusinessTypes)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getBusinessTypes)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getBusinessTypes, {cache: true})\r\n }\r\n\r\n\r\n function getTransportationModes(data) {\r\n var httpCache = $cacheFactory.get('$http');\r\n var deferred = $q.defer();\r\n if (httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getTransportationModes)) {\r\n var data = {\r\n data: JSON.parse(httpCache.get(CONFIG.rest.baseURI + CONFIG.rest.getTransportationModes)[1])\r\n };\r\n deferred.resolve(data);\r\n return deferred.promise;\r\n }\r\n return $http.post(CONFIG.rest.baseURI + CONFIG.rest.getTransportationModes, {cache: 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('lx')\r\n .factory('CommonService', CommonService);\r\n\r\n /** @ngInject */\r\n\r\n function CommonService(CONFIG, $http) {\r\n return {\r\n formatDate: formatDate,\r\n getDateOfWeek: getDateOfWeek,\r\n getListPagesByPageType: getListPagesByPageType,\r\n checkDate: checkDate,\r\n checkTime: checkTime,\r\n confirmEmail: confirmEmail,\r\n resetPassword: resetPassword,\r\n resetPasswordWithToken: resetPasswordWithToken,\r\n sendContact:sendContact\r\n }\r\n function formatDate(d) {\r\n return moment(d).format('HH:mm')\r\n }\r\n\r\n function getDateOfWeek(d) {\r\n var day = moment(d).isoWeekday();\r\n if (day === 1) return 'MON';\r\n if (day === 2) return 'TUE';\r\n if (day === 3) return 'WED';\r\n if (day === 4) return 'THU';\r\n if (day === 5) return 'FRI';\r\n if (day === 6) return 'SAT';\r\n if (day === 7) return 'SUN';\r\n }\r\n\r\n function checkDate(startDate, endDate) {\r\n var newStartDate = new Date(startDate),\r\n newEndDate = new Date(endDate);\r\n if (newStartDate.getFullYear() == newEndDate.getFullYear() &&\r\n newStartDate.getMonth() == newEndDate.getMonth() &&\r\n newStartDate.getDate() == newEndDate.getDate()) return true;\r\n return false;\r\n }\r\n\r\n function checkTime(startTime, endTime) {\r\n var newStartTime = new Date(startTime),\r\n newEndTime = new Date(endTime);\r\n if (newStartTime.getHours() == newEndTime.getHours() && newStartTime.getMinutes() == newEndTime.getMinutes())return true;\r\n return false\r\n }\r\n\r\n function confirmEmail(id, code) {\r\n var req = {\r\n method: 'GET',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.confirm + \"?id=\" + id + \"&code=\" + code\r\n };\r\n return $http(req);\r\n }\r\n\r\n function resetPassword(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.resetPassword,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function resetPasswordWithToken(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.resetPasswordWithToken + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n function sendContact(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.sendContact,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n function getListPagesByPageType(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.landingPage.getListPagesByPageType,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .factory('Auth', authService)\r\n .factory('authInterceptor', authInterceptor);\r\n\r\n /** @ngInject */\r\n\r\n function authService($q, CONFIG, $http, User, $localStorage) {\r\n var currentUser = {};\r\n if ($localStorage.token) {\r\n currentUser = User.get();\r\n }\r\n return {\r\n /**\r\n * Authenticate user and save token\r\n *\r\n * @param {Object} user - login info\r\n * @param {Function} callback - optional\r\n * @return {Promise}\r\n */\r\n login: login,\r\n /**\r\n * Delete access token and user info\r\n *\r\n * @param {Function}\r\n */\r\n logout: logout,\r\n /**\r\n * Gets all available info on authenticated user\r\n *\r\n * @return {Object} user\r\n */\r\n getCurrentUser: getCurrentUser,\r\n /**\r\n * Check if a user is logged in\r\n *\r\n * @return {Boolean}\r\n */\r\n isAuthenticated: isAuthenticated,\r\n setCurrentUser: setCurrentUser,\r\n /**\r\n * Waits for currentUser to resolve before checking if user is logged in\r\n */\r\n isAuthenticatedAsync: isAuthenticatedAsync,\r\n isAuthorized: isAuthorized,\r\n loginWithoutConfirm: loginWithoutConfirm,\r\n getLocationFromUserAddress: getLocationFromUserAddress\r\n };\r\n\r\n function loginWithoutConfirm(user) {\r\n var deferred = $q.defer();\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.action.signinWithoutConfirm;\r\n\r\n $http.post(url, user)\r\n .success(function (data) {\r\n $localStorage.token = data.result.token;\r\n $localStorage.expireInSeconds = data.result.expireInSeconds;\r\n currentUser = data;\r\n $localStorage.userProfile = data.result.user;\r\n $localStorage.searchFilter = data.result.user;\r\n deferred.resolve(data.result);\r\n return data.result.user;\r\n })\r\n .error(function (err) {\r\n this.logout();\r\n deferred.reject(err);\r\n }.bind(this));\r\n return deferred.promise;\r\n }\r\n\r\n function login(user) {\r\n var deferred = $q.defer();\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.action.signin;\r\n var self = this;\r\n $http.post(url, user)\r\n .success(function (data) {\r\n $localStorage.token = data.result.token;\r\n $localStorage.expireInSeconds = data.result.expireInSeconds;\r\n currentUser = data;\r\n $localStorage.userProfile = data.result.user;\r\n $localStorage.searchFilter = data.result.user;\r\n self.getLocationFromUserAddress(data.result.user);\r\n deferred.resolve(data.result);\r\n return data.result.user;\r\n })\r\n .error(function (err) {\r\n this.logout();\r\n deferred.reject(err);\r\n }.bind(this));\r\n return deferred.promise;\r\n }\r\n\r\n function logout() {\r\n currentUser = {};\r\n delete $localStorage.token;\r\n delete $localStorage.expireInSeconds;\r\n delete $localStorage.userProfile;\r\n delete $localStorage.searchFilter;\r\n localStorage.clear();\r\n }\r\n\r\n function getCurrentUser() {\r\n return currentUser;\r\n }\r\n\r\n function setCurrentUser(userData) {\r\n angular.merge(currentUser, userData);\r\n }\r\n\r\n function isAuthenticated() {\r\n return currentUser.hasOwnProperty('result');\r\n }\r\n\r\n function isAuthenticatedAsync(cb) {\r\n if (currentUser.hasOwnProperty('$promise')) {\r\n currentUser.$promise.then(function () {\r\n cb(true);\r\n }).catch(function () {\r\n cb(false);\r\n });\r\n } else if (currentUser.hasOwnProperty('result')) {\r\n cb(true);\r\n } else {\r\n cb(false);\r\n }\r\n }\r\n\r\n function isAuthorized(authorizedRoles) {\r\n if (!angular.isArray(authorizedRoles)) {\r\n authorizedRoles = [authorizedRoles];\r\n }\r\n return (this.isAuthenticated() && authorizedRoles.indexOf(currentUser.result.user.roleName) !== -1);\r\n }\r\n\r\n function getLocationFromUserAddress(user) {\r\n var geocoder = new google.maps.Geocoder();\r\n var self = this;\r\n if (self.isAuthorized(CONFIG.userRoles.candidate)) {\r\n if (user.profile != null && user.profile.address != null) {\r\n var lat = user.profile.address.lat;\r\n var lng = user.profile.address.lng;\r\n var latlng = new google.maps.LatLng(lat, lng);\r\n geocoder.geocode({'latLng': latlng}, function (results) {\r\n if (results\r\n && results.length > 0\r\n && results[0].address_components\r\n && results[0].address_components.length > 0) {\r\n results[0].address_components.forEach(function (address) {\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_code') >= 0) {\r\n user.profile.address.town = address.long_name;\r\n \r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n user.profile.address.county = address.long_name;\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n user.profile.address.country = address.long_name\r\n }\r\n });\r\n user.profile.address.shortAddressLine = getShortAddressLine(user.profile.address.addressLine, results[0].address_components);\r\n }\r\n $localStorage.userProfile = user;\r\n $localStorage.address = user.profile.address;\r\n });\r\n }\r\n } else if (self.isAuthorized(CONFIG.userRoles.client)) {\r\n if (user.companyProfile != null && user.companyProfile.address != null) {\r\n var lat = user.companyProfile.address.lat;\r\n var lng = user.companyProfile.address.lng;\r\n var latlng = new google.maps.LatLng(lat, lng);\r\n geocoder.geocode({'latLng': latlng}, function (results) {\r\n if (results\r\n && results.length > 0\r\n && results[0].address_components\r\n && results[0].address_components.length > 0) {\r\n results[0].address_components.forEach(function (address) {\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_code') >= 0) {\r\n user.companyProfile.address.town = address.long_name;\r\n \r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n user.companyProfile.address.county = address.long_name;\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n user.companyProfile.address.country = address.long_name\r\n }\r\n });\r\n user.companyProfile.address.shortAddressLine = getShortAddressLine(user.companyProfile.address.addressLine, results[0].address_components);\r\n }\r\n $localStorage.userProfile = user;\r\n $localStorage.address = user.companyProfile.address;\r\n });\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n function getShortAddressLine(address, address_components) {\r\n var words = address.split(', ');\r\n address_components.forEach(function (address) {\r\n\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_code') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', ''));\r\n })\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('postal_town') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', ''));\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('administrative_area_level_2') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', ''));\r\n });\r\n }\r\n if (address.types\r\n && address.types.length > 0\r\n && address.types.indexOf('country') >= 0) {\r\n words = words.filter(function (x) {\r\n return (x.toLowerCase().replace(' ', '') != address.long_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != address.short_name.toLowerCase().replace(' ', '') &&\r\n x.toLowerCase().replace(' ', '') != abbrevName(address.long_name.toLowerCase()).replace(' ', ''));\r\n });\r\n }\r\n });\r\n var addressLine = words.join(\" \");\r\n return addressLine;\r\n }\r\n\r\n function abbrevName(str1) {\r\n var split_names = str1.trim().split(\" \");\r\n if (split_names.length > 1) {\r\n return (split_names[0].charAt(0) + split_names[1].charAt(0));\r\n }\r\n return split_names[0];\r\n }\r\n\r\n function authInterceptor($q, $localStorage, $location) {\r\n return {\r\n // Add authorization token to headers\r\n request: function (config) {\r\n config.headers = config.headers || {};\r\n //config.headers['Content-Type'] = 'application/json';\r\n if ($localStorage.token) {\r\n config.headers.Authorization = 'Bearer ' + $localStorage.token;\r\n }\r\n return config;\r\n },\r\n // Intercept 401s and redirect you to login\r\n responseError: function (response) {\r\n if (response.status === 401) {\r\n $location.path('/login');\r\n // remove any stale tokens\r\n delete $localStorage.token;\r\n return $q.reject(response);\r\n }\r\n else {\r\n return $q.reject(response);\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('lx')\r\n .directive('lxScrollTop', lxScrollTop);\r\n\r\n function lxScrollTop() {\r\n\r\n return {\r\n templateUrl: 'app/components/scroll-top/scroll-top.html',\r\n restrict: 'EA',\r\n link: link\r\n };\r\n\r\n function link(scope, element) {\r\n\r\n var whtml = angular.element(document).height();\r\n\r\n angular.element(window).scroll(function () {\r\n if (angular.element(this).scrollTop() > whtml / 100) {\r\n angular.element(element).fadeIn();\r\n } else {\r\n angular.element(element).fadeOut();\r\n }\r\n });\r\n angular.element(element).click(function () {\r\n angular.element('body,html').animate({\r\n scrollTop: 0\r\n }, 500);\r\n return false;\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('lx')\r\n .filter('range', function() {\r\n return function(input, min, max) {\r\n min = parseInt(min);\r\n max = parseInt(max);\r\n for (var i=min; i<=max; i++)\r\n input.push(i);\r\n return input;\r\n };\r\n });\r\n})();\r\n\n(function () {\r\n \"use strict\";\r\n\r\n\r\n angular.module('lx')\r\n .directive('profile', function () {\r\n\r\n return {\r\n restrict: 'AE',\r\n templateUrl: 'app/components/profile/profile.html',\r\n scope: {},\r\n controller: 'ProfileController',\r\n controllerAs: 'vm',\r\n bindToController: {\r\n candidate: '=?'\r\n },\r\n replace: true\r\n }\r\n })\r\n .controller('ProfileController', profileController);\r\n\r\n function profileController($scope, CONFIG, CommonService, $sce, $timeout) {\r\n var vm = this;\r\n vm.isPlay = true;\r\n vm.link = CONFIG.rest.baseURILink;\r\n\r\n vm.getDateOfWeek = function (d) {\r\n return CommonService.getDateOfWeek(d)\r\n };\r\n vm.formatDate = function (d) {\r\n return CommonService.formatDate(d)\r\n };\r\n vm.play = function (e) {\r\n var elem = angular.element(e.currentTarget);\r\n if (elem[0].paused) {\r\n vm.isPlay = false;\r\n elem[0].play();\r\n elem.on('ended', function () {\r\n $timeout(function () {\r\n if (!vm.isPlay) {\r\n vm.isPlay = true;\r\n }\r\n }, 0);\r\n })\r\n } else {\r\n vm.isPlay = true;\r\n elem[0].pause();\r\n }\r\n\r\n };\r\n vm.buttonPlay = function (e) {\r\n var elem = angular.element(e.currentTarget).parent().find('video');\r\n if (elem[0].paused) {\r\n vm.isPlay = false;\r\n elem[0].play();\r\n elem.muted = \"muted\";\r\n elem.on('ended', function () {\r\n $timeout(function () {\r\n if (!vm.isPlay) {\r\n vm.isPlay = true;\r\n }\r\n }, 0);\r\n })\r\n } else {\r\n vm.isPlay = true;\r\n elem[0].pause();\r\n }\r\n }\r\n vm.profileStarTooltip = $sce.trustAsHtml('Star rankings are made up from:
Ratings by employers
Profile completeness
Candidate responsiveness

See FAQ for more details');\r\n }\r\n})();\r\n\n(function () {\r\n \"use strict\";\r\n\r\n angular\r\n .module('lx')\r\n .directive('lxPdfViewer', lxPdfViewer);\r\n\r\n function lxPdfViewer() {\r\n\r\n return {\r\n templateUrl: 'app/components/pdf-viewer/pdf-viewer.html',\r\n restrict: 'E',\r\n scope: {\r\n pdfSrc: '@pdfSrc'\r\n },\r\n link: function ($scope, element) {\r\n loadPdf();\r\n\r\n function loadPdf() {\r\n const PDFJS = window.pdfjsLib;\r\n const pdfJsViewer = window.pdfjsViewer;\r\n PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK;\r\n PDFJS.disableStream = true;\r\n\r\n const pdfLinkService = new pdfJsViewer.PDFLinkService();\r\n\r\n\r\n const container = angular.element(element).find('div');\r\n const el = container[0];\r\n\r\n const pdfViewer = new pdfJsViewer.PDFViewer({\r\n container: el,\r\n linkService: pdfLinkService,\r\n enhanceTextSelection: true\r\n });\r\n window.theViewer = pdfViewer;\r\n const docInitParams = {\r\n url: $scope.pdfSrc\r\n };\r\n\r\n const pdfLoadingTask = PDFJS.getDocument(docInitParams);\r\n\r\n pdfLoadingTask.then(function (doc) {\r\n pdfViewer.setDocument(doc);\r\n pdfLinkService.setDocument(doc, $scope.pdfSrc);\r\n }).catch(function (err) {\r\n console.error(err);\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('lx')\r\n .directive('lxNav', lxNav);\r\n\r\n function lxNav($rootScope, $window, $state, $stateParams, Auth, CONFIG, $localStorage, SignupClientService,\r\n SignupCandidateService, $timeout) {\r\n\r\n return {\r\n templateUrl: 'app/components/nav/nav.html',\r\n restrict: 'EA',\r\n link: link\r\n };\r\n\r\n function link(scope, element) {\r\n scope.$window = $window;\r\n scope.isNavCollapsed = false;\r\n scope.candidate = false;\r\n scope.client = false;\r\n scope.checked = true;\r\n var hhtml = angular.element(document).height();\r\n scope.currentUser = Auth.getCurrentUser;\r\n scope.user = angular.copy($localStorage.userProfile);\r\n checkAcceptedPolicy();\r\n\r\n scope.routeConfig = CONFIG.routes;\r\n scope.tabConfig = CONFIG.activeTab;\r\n scope.logout = function () {\r\n Auth.logout();\r\n $rootScope.isHasLogin = true;\r\n $rootScope.showNewPolicySticky = false;\r\n\r\n delete $localStorage.user;\r\n delete $localStorage.userProfile;\r\n scope.user = null;\r\n\r\n $state.go(CONFIG.routes.login)\r\n };\r\n scope.loginPage = function () {\r\n $rootScope.isHasLogin = false;\r\n $state.go(CONFIG.routes.login)\r\n };\r\n\r\n scope.goCandidatePage = function (user) {\r\n if (user) {\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack)\r\n } else {\r\n $state.go(CONFIG.routes.candidate.signup.step1)\r\n }\r\n };\r\n scope.goClientPage = function (user) {\r\n if (user) {\r\n $state.go(CONFIG.routes.client.portal.welcomeBack)\r\n } else {\r\n $state.go(CONFIG.routes.client.signup.home)\r\n }\r\n };\r\n scope.homePage = function () {\r\n $state.go(CONFIG.routes.home)\r\n };\r\n scope.goAdminPage = function () {\r\n $state.go(CONFIG.routes.admin.main)\r\n };\r\n scope.goFAQPage = function () {\r\n $state.go(CONFIG.routes.common.faq)\r\n };\r\n scope.goAboutPage = function () {\r\n $state.go(CONFIG.routes.common.aboutUs)\r\n };\r\n scope.goToFacilitiesManagment = function () {\r\n $state.go(CONFIG.routes.corporate.facilitiesManagement);\r\n }\r\n scope.goToHospitality = function () {\r\n $state.go(CONFIG.routes.corporate.hospitality);\r\n }\r\n scope.goToFinalMileDelivery = function () {\r\n $state.go(CONFIG.routes.corporate.finalMileDelivery);\r\n }\r\n scope.gotToWarehouse = function () {\r\n $state.go(CONFIG.routes.corporate.warehouse);\r\n }\r\n scope.goToManufacturing = function () {\r\n $state.go(CONFIG.routes.corporate.manufacturing);\r\n }\r\n scope.goToCare = function () {\r\n $state.go(CONFIG.routes.corporate.care);\r\n }\r\n scope.goToCantBePigeonholed = function () {\r\n $state.go(CONFIG.routes.corporate.cantBePigeonholed);\r\n }\r\n scope.toggleButton = function () {\r\n scope.isNavCollapsed = !scope.isNavCollapsed;\r\n };\r\n scope.activeMenu = function (activeTab) {\r\n if (activeTab)\r\n scope.activeTab = activeTab;\r\n };\r\n scope.$window.onclick = function (e) {\r\n e.stopPropagation();\r\n $timeout(function () {\r\n if ($(e.target).closest('.navbar-header').length == 0 && $(e.target).closest(\"#bs-example-navbar-collapse-1\").length === 0) {\r\n scope.isNavCollapsed = false;\r\n }\r\n }, 0);\r\n };\r\n scope.isEmpty = function isEmpty(obj) {\r\n for (var key in obj) {\r\n if (obj.hasOwnProperty(key))\r\n return false;\r\n }\r\n return true;\r\n };\r\n $rootScope.$on('$stateChangeStart',\r\n function (event, toState, toParams, fromState, fromParams) {\r\n scope.isNavCollapsed = false;\r\n });\r\n $rootScope.$on('$stateChangeSuccess',\r\n function (event, toState, toParams, fromState, fromParams) {\r\n scope.activeMenu($state.current.activeTab);\r\n });\r\n\r\n angular.element(window).scroll(function () {\r\n var whtml = angular.element(document).width();\r\n if (angular.element(this).scrollTop() > hhtml / 100 && whtml < 769) {\r\n element.find(\"#nav-mobile\").fadeOut()\r\n\r\n } else {\r\n element.find(\"#nav-mobile\").fadeIn()\r\n }\r\n });\r\n\r\n scope.onClickYesStickyBtn = function (user) {\r\n if(user) {\r\n user.isAcceptedGDPR = true;\r\n }\r\n $rootScope.showNewPolicySticky = false;\r\n if ($rootScope.isClient) {\r\n SignupClientService.updateClientUserFull(user).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n })\r\n } else {\r\n if ($rootScope.isCandidate) {\r\n SignupCandidateService.updateCandidateUserFull(user).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n })\r\n }\r\n }\r\n };\r\n\r\n scope.onClickNoStickyBtn = function (user) {\r\n $rootScope.showNewPolicySticky = false;\r\n if(user) {\r\n user.isAcceptedGDPR = false;\r\n }\r\n if ($rootScope.isClient) {\r\n SignupClientService.updateClientUserFull(user).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n })\r\n } else {\r\n if ($rootScope.isCandidate) {\r\n SignupCandidateService.updateCandidateUserFull(user).then(function (data) {\r\n $localStorage.userProfile = data.data.result;\r\n $rootScope.loading = false;\r\n })\r\n }\r\n }\r\n };\r\n\r\n function checkAcceptedPolicy() {\r\n if (!scope.isHasLogin || (scope.isHasLogin && (\r\n $rootScope.isAdmin ||\r\n (($rootScope.isCandidate || $rootScope.isClient) && $localStorage.userProfile && $localStorage.userProfile.isAcceptedGDPR == true)))) {\r\n $rootScope.showNewPolicySticky = false;\r\n } else {\r\n $rootScope.showNewPolicySticky = true;\r\n }\r\n }\r\n\r\n $rootScope.$on('user:loggedIn', function () {\r\n scope.currentUser = Auth.getCurrentUser;\r\n scope.user = angular.copy($localStorage.userProfile);\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('lx')\r\n .directive('lxLoading', lxLoading);\r\n\r\n function lxLoading() {\r\n\r\n return {\r\n templateUrl: 'app/components/loading/loading.html',\r\n restrict: 'EA',\r\n scope: '=loading'\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('lx')\r\n .directive('lxFooter', lxFooter);\r\n\r\n function lxFooter($state, CONFIG) {\r\n\r\n return {\r\n templateUrl: 'app/components/footer/footer.html',\r\n restrict: 'EA',\r\n controller: function ($scope) {\r\n $scope.routeConfig = CONFIG.routes;\r\n $scope.tabConfig = CONFIG.activeTab;\r\n $scope.goContacUs = goContacUs;\r\n function goContacUs() {\r\n var newHash = 'contactUs';\r\n\r\n if($state.current.name !== CONFIG.routes.home){\r\n $state.go(CONFIG.routes.home,{type: 'contact'});\r\n }else{\r\n console.log($(\"#\"+newHash).offset().top)\r\n $('html,body').animate({scrollTop: $(\"#\"+newHash).offset().top},'slow');\r\n return false;\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\r\n angular.module('lx')\r\n .directive('dateTime', function (CONFIG) {\r\n\r\n return {\r\n restrict: 'AE',\r\n templateUrl: function (elem, attr) {\r\n return 'app/components/dateTimePicker/' + attr.template + '.html';\r\n },\r\n scope: {\r\n dateFrom: '=?dateFrom',\r\n dateTo: '=?dateTo',\r\n timeFrom: '=?timeFrom',\r\n timeTo: '=?timeTo',\r\n confirmBooking : '=?confirmBooking'\r\n },\r\n controller: function ($scope,$element) {\r\n $scope.dateFormat = CONFIG.bootstrapDateFormat;\r\n var date = moment();\r\n $scope.dateFromOptions = {\r\n formatYear: 'yyyy',\r\n startingDay: 1,\r\n minDate: date\r\n };\r\n $scope.dateToOptions = {\r\n formatYear: 'yyyy',\r\n startingDay: 1,\r\n minDate: date\r\n };\r\n $scope.calendarPopup = {\r\n toDateOpened: false,\r\n fromDateOpened: false\r\n };\r\n $scope.timePickerFromOptions = {\r\n timeFormat: 'H:i',\r\n showOn: [],\r\n disableTimeRanges: [[]],\r\n minTime: '00:00',\r\n maxTime: '23:45'\r\n };\r\n $scope.timePickerToOptions = {\r\n timeFormat: 'H:i',\r\n showOn: [],\r\n minTime: '00:00',\r\n maxTime: '23:45'\r\n };\r\n $scope.changeMinAndMaxDates = changeMinAndMaxDates;\r\n $scope.openCalendarPopup = openCalendarPopup;\r\n $scope.getDefaultDate = getDefaultDate;\r\n $scope.changeTimeTo = changeTimeTo;\r\n $scope.changeTimeFrom = changeTimeFrom;\r\n activate();\r\n function activate() {\r\n getTime();\r\n changeMinAndMaxDates();\r\n getDefaultDate();\r\n }\r\n\r\n function getTime() {\r\n if (!$scope.dateFrom) {\r\n $scope.dateFrom = date;\r\n $scope.dateTo = moment(date).set('date', moment(date).date() + 7);\r\n }\r\n\r\n\r\n }\r\n\r\n function openCalendarPopup(check) {\r\n if (check === 'from' && !$scope.confirmBooking) {\r\n $scope.calendarPopup.fromDateOpened = true;\r\n }\r\n if (check === 'to' && !$scope.confirmBooking) {\r\n $scope.calendarPopup.toDateOpened = true;\r\n }\r\n }\r\n\r\n function changeMinAndMaxDates() {\r\n if (moment($scope.dateFrom).valueOf() >= moment($scope.dateTo).valueOf()) {\r\n $scope.dateTo = moment($scope.dateFrom);\r\n }\r\n $scope.dateToOptions.minDate = moment($scope.dateFrom).toDate();\r\n\r\n\r\n }\r\n\r\n function getDefaultDate() {\r\n if (!$scope.dateFrom) {\r\n $scope.dateFrom = date\r\n }\r\n if (!$scope.dateTo) {\r\n $scope.dateTo = moment($scope.dateFrom)\r\n }\r\n if (!$scope.timeFrom) {\r\n $scope.timeFrom = date;\r\n }\r\n if (!$scope.timeTo) {\r\n $scope.timeTo = moment($scope.timeFrom)\r\n }\r\n if (moment($scope.dateTo).get('year') < moment($scope.dateFrom).get('year') ||\r\n moment($scope.dateTo).get('year') == moment($scope.dateFrom).get('year') &&\r\n moment($scope.dateTo).get('month') < moment($scope.dateFrom).get('month') ||\r\n moment($scope.dateTo).get('year') == moment($scope.dateFrom).get('year') &&\r\n moment($scope.dateTo).get('month') == moment($scope.dateFrom).get('month') &&\r\n moment($scope.dateTo).get('date') == moment($scope.dateFrom).get('date')\r\n ) {\r\n $scope.dateFrom = moment($scope.dateTo).toDate();\r\n $scope.dateTo = moment($scope.dateFrom).toDate();\r\n }\r\n\r\n }\r\n\r\n\r\n function changeTimeFrom() {\r\n\r\n var timeFrom = moment($scope.timeFrom).hour() * 3600 + moment($scope.timeFrom).minutes() * 60;\r\n var timeTo = moment($scope.timeTo).hour() * 3600 + moment($scope.timeTo).minutes() * 60;\r\n if (timeTo <= timeFrom) {\r\n if (timeTo == 28800) {\r\n $scope.timeFrom = angular.copy($scope.timeTo)\r\n } else {\r\n $scope.timeFrom = moment($scope.timeTo).set('minute' , moment($scope.timeTo).minute() - 15).toDate();\r\n }\r\n }\r\n $element.find(\"#timeFrom\").timepicker('hide');\r\n\r\n }\r\n\r\n function changeTimeTo() {\r\n var timeFrom = moment($scope.timeFrom).hour() * 3600 + moment($scope.timeFrom).minutes() * 60;\r\n var timeTo = moment($scope.timeTo).hour() * 3600 + moment($scope.timeTo).minutes() * 60;\r\n\r\n if (timeFrom >= timeTo) {\r\n $scope.timeTo = moment($scope.timeFrom).set('minute' , moment($scope.timeFrom).minute() + 15).toDate();\r\n }\r\n $element.find(\"#timeTo\").timepicker('hide');\r\n }\r\n },\r\n link: function (scope, element, attrs) {\r\n\r\n element.find(\"#timeFormButton\").on('click', function () {\r\n if(!scope.confirmBooking)\r\n element.find(\"#timeFrom\").timepicker('show');\r\n });\r\n element.find(\"#timeToButton\").on('click', function () {\r\n if(!scope.confirmBooking)\r\n element.find(\"#timeTo\").timepicker('show');\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 angular.module('lx')\r\n .directive('lxCandidates', function () {\r\n\r\n return {\r\n restrict: 'AE',\r\n templateUrl: 'app/components/candidates/candidates.html',\r\n scope: {},\r\n controller: 'ProfileCandidateController',\r\n controllerAs: 'vm',\r\n bindToController: {\r\n data: '=?',\r\n onCandidateChanged: '&?'\r\n }\r\n }\r\n })\r\n .controller('ProfileCandidateController', ProfileCandidateController);\r\n\r\n function ProfileCandidateController(SignupClientService, $rootScope) {\r\n var vm = this;\r\n $rootScope.loading = true;\r\n //current candidate\r\n vm.position1 = 0;\r\n vm.position2 = 1;\r\n vm.position3 = 2;\r\n vm.positionTemp1 = 0;\r\n vm.positionTemp2 = 1;\r\n vm.positionTemp3 = 2;\r\n vm.page = 1;\r\n vm.noCandidateAll = false;\r\n //get candidates with page from scope.page. set current candidate\r\n vm.candidates = [];\r\n vm.listCandidate = [];\r\n if (vm.data) {\r\n vm.candidatesDataFirstFind = angular.extend(vm.data, {\r\n pageSize: 30,\r\n pageNo: angular.copy(vm.page)\r\n });\r\n }\r\n\r\n var candidatesDataFirstFind = angular.copy(vm.candidatesDataFirstFind);\r\n SignupClientService.findStaffs(candidatesDataFirstFind).then(function (resp) {\r\n $rootScope.loading = false;\r\n vm.candidates = resp.data.result.items;\r\n vm.listCandidate = resp.data.result.items;\r\n vm.totalCount = resp.data.result.totalCount;\r\n if (vm.candidates.length > 0) {\r\n vm.onCandidateChanged({\r\n candidates: [{candidate: vm.candidates[vm.position1]},\r\n {candidate: vm.candidates[vm.position2]},\r\n {candidate: vm.candidates[vm.position3]}],\r\n listCandidate: vm.candidates\r\n });\r\n } else {\r\n vm.noCandidateAll = 'These are a selection of candidates that meet your requirements';\r\n }\r\n\r\n }, function () {\r\n $rootScope.loading = false;\r\n });\r\n\r\n vm.next = next;\r\n vm.pre = pre;\r\n\r\n\r\n function next(pos) {\r\n if ((vm.positionTemp1 >= vm.candidates.length - 3 && pos == 1 ||\r\n vm.positionTemp2 >= vm.candidates.length - 3 && pos == 2 ||\r\n vm.positionTemp3 >= vm.candidates.length - 3 && pos == 3)) {\r\n //load more candidate\r\n if(vm.totalCount > 30 * vm.page){\r\n vm.page++;\r\n var candidatesDataLastFind = angular.merge(vm.data, {\r\n pageSize: 30,\r\n pageNo: angular.copy(vm.page)\r\n });\r\n $rootScope.loading = true;\r\n SignupClientService.findStaffs(candidatesDataLastFind).then(function (resp) {\r\n if (resp.data.result.items.length > 0) {\r\n resp.data.result.items.forEach(function (item) {\r\n vm.candidates.push(item);\r\n });\r\n $rootScope.loading = false;\r\n calculatePostion(pos, 'next');\r\n } else {\r\n $rootScope.loading = false;\r\n }\r\n\r\n });\r\n }\r\n } else {\r\n calculatePostion(pos, 'next');\r\n vm.onCandidateChanged({\r\n candidates: [{candidate: vm.candidates[vm.position1]},\r\n {candidate: vm.candidates[vm.position2]},\r\n {candidate: vm.candidates[vm.position3]}],\r\n listCandidate: vm.candidates\r\n });\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n function pre(pos) {\r\n calculatePostion(pos, 'pre');\r\n if (vm.positionTemp1 > 0 && pos == 1 ||\r\n vm.positionTemp2 > 1 && pos == 2 ||\r\n vm.positionTemp3 > 2 && pos == 3) {\r\n vm.onCandidateChanged({\r\n candidates: [{candidate: vm.candidates[vm.position1]},\r\n {candidate: vm.candidates[vm.position2]},\r\n {candidate: vm.candidates[vm.position3]}],\r\n listCandidate: vm.candidates\r\n });\r\n }\r\n }\r\n\r\n function calculatePostion(num, type) {\r\n if (type == 'next') {\r\n switch (num) {\r\n case 1: {\r\n vm.positionTemp1 = vm.positionTemp1 + 3;\r\n if (vm.positionTemp1 > vm.totalCount && vm.position1 > 0) {\r\n vm.position1 = angular.copy(vm.positionTemp1 - 3);\r\n vm.positionTemp1 = vm.position1\r\n } else {\r\n vm.position1 = angular.copy(vm.positionTemp1)\r\n }\r\n break;\r\n }\r\n case 2: {\r\n vm.positionTemp2 = vm.positionTemp2 + 3;\r\n if (vm.positionTemp2 > vm.totalCount && vm.position2 > 1) {\r\n vm.position2 = angular.copy(vm.positionTemp2 - 3);\r\n vm.positionTemp2 = vm.position2\r\n } else {\r\n vm.position2 = angular.copy(vm.positionTemp2)\r\n }\r\n break;\r\n }\r\n default:\r\n case 3: {\r\n vm.positionTemp3 = vm.positionTemp3 + 3;\r\n if (vm.positionTemp3 > vm.totalCount && vm.position3 > 2) {\r\n vm.position3 = angular.copy(vm.positionTemp3 - 3);\r\n vm.positionTemp3 = vm.position3\r\n } else {\r\n vm.position3 = angular.copy(vm.positionTemp3)\r\n }\r\n break;\r\n }\r\n }\r\n } else {\r\n switch (num) {\r\n case 1: {\r\n vm.positionTemp1 = vm.positionTemp1 - 3;\r\n vm.position1 = angular.copy(vm.positionTemp1);\r\n break;\r\n }\r\n case 2: {\r\n vm.positionTemp2 = vm.positionTemp2 - 3;\r\n vm.position2 = angular.copy(vm.positionTemp2);\r\n break;\r\n }\r\n default:\r\n case 3: {\r\n vm.positionTemp3 = vm.positionTemp3 - 3;\r\n vm.position3 = angular.copy(vm.positionTemp3);\r\n break;\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('lx')\r\n .directive('redAffix', redAffix);\r\n\r\n function redAffix($document,$window) {\r\n\r\n return {\r\n restrict: 'A',\r\n link: link\r\n };\r\n\r\n function link(scope, element, attrs) {\r\n var child = element.children(0);\r\n\r\n function checkPosition() {\r\n var position = angular.element(element).offset();\r\n var scrollTop \t\t= angular.element($window).prop(\"pageYOffset\"),\r\n positionTop \t= attrs.offsetTop ? attrs.offsetTop : element.prop('offsetTop'),\r\n pinnedOffset = position.top - positionTop;\r\n\r\n if (scrollTop >= pinnedOffset) {\r\n child.addClass('affix');\r\n child.css({top: positionTop + 'px'});\r\n\r\n } else {\r\n child.removeClass('affix');\r\n child.css({top: 'auto'});\r\n }\r\n }\r\n\r\n function resizeChild(e, c) {\r\n e.css({height: c[0].offsetHeight + 'px'});\r\n c.css({width: e[0].offsetWidth + 'px'});\r\n }\r\n\r\n angular.element($window).bind('scroll', checkPosition);\r\n angular.element($window).on('resize', function() {\r\n resizeChild(element, child);\r\n });\r\n angular.element($document).ready(function() {\r\n resizeChild(element, child);\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('lx.common', []);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.common')\r\n .controller('RecruitmentController', RecruitmentController);\r\n\r\n /** @ngInject */\r\n function RecruitmentController($state, $rootScope, CONFIG, CommonService) {\r\n var vm = this;\r\n vm.filter = {\r\n typeName: CONFIG.pageTypes.recruitmentGuide,\r\n pageNo: 1,\r\n pageSize: 25\r\n };\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.routeConfig = CONFIG.routes;\r\n active();\r\n vm.clickGoForBusinessPage = clickGoForBusinessPage;\r\n vm.clickGoForIndividualsPage = clickGoForIndividualsPage;\r\n vm.loadMoreLandings = loadMoreLandings;\r\n vm.landingPages = [];\r\n\r\n vm.business = [{\r\n title: 'Part 1 - Criterea',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 2 - Selection',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 3 – Blah blah',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }];\r\n\r\n function clickGoForIndividualsPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'individualsGuide'})\r\n }\r\n\r\n function clickGoForBusinessPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'businessGuide'})\r\n }\r\n\r\n function active() {\r\n getListRecruitmentPage();\r\n }\r\n\r\n function getListRecruitmentPage() {\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = res.data.result.items;\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length == 0) {\r\n vm.listLandingResponse = 'No recruitment guide';\r\n } else {\r\n vm.displayTitleNews = vm.landingPages[0].title;\r\n if (vm.landingPages.length < vm.totalLanding) {\r\n vm.loadMoreLanding = true;\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No recruitment guide';\r\n })\r\n }\r\n\r\n function loadMoreLandings() {\r\n if (vm.loadMoreLanding) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = vm.landingPages.concat(res.data.result.items);\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length >= vm.totalLanding) {\r\n vm.loadMoreLanding = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No recruitment guide';\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('lx.common')\r\n .controller('NewsController', NewsController);\r\n\r\n /** @ngInject */\r\n function NewsController($state, $rootScope, CONFIG, CommonService) {\r\n var vm = this;\r\n\r\n vm.filter = {\r\n typeName: CONFIG.pageTypes.news,\r\n pageNo: 1,\r\n pageSize: 25\r\n };\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.routeConfig = CONFIG.routes;\r\n vm.clickDisplayTitleNews = clickDisplayTitleNews;\r\n vm.loadMoreLandings = loadMoreLandings;\r\n vm.landingPages = [];\r\n vm.displayTitleNews = '';\r\n\r\n active();\r\n\r\n function clickDisplayTitleNews(title) {\r\n vm.displayTitleNews = title;\r\n }\r\n\r\n function active() {\r\n getListNewsPage();\r\n }\r\n\r\n function getListNewsPage() {\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = res.data.result.items;\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length == 0) {\r\n vm.listLandingResponse = 'No news';\r\n } else {\r\n vm.displayTitleNews = vm.landingPages[0].title;\r\n if (vm.landingPages.length < vm.totalLanding) {\r\n vm.loadMoreLanding = true;\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No news';\r\n })\r\n }\r\n\r\n function loadMoreLandings() {\r\n if (vm.loadMoreLanding) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n CommonService.getListPagesByPageType(vm.filter).then(function (res) {\r\n vm.landingPages = vm.landingPages.concat(res.data.result.items);\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPages.length >= vm.totalLanding) {\r\n vm.loadMoreLanding = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No news';\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('lx.common')\r\n .controller('HowItWorksController', HowItWorksController);\r\n\r\n /** @ngInject */\r\n function HowItWorksController($state, CONFIG, $location, $anchorScroll) {\r\n var vm = this;\r\n vm.howItWorkCandidateVideo = \"https://player.vimeo.com/video/157588560\";\r\n vm.howItWorkCandidatePhoto = \"https://i.vimeocdn.com/video/558921296.jpg\";\r\n vm.howItWorkClientVideo = \"https://player.vimeo.com/video/157588560\";\r\n vm.howItWorkClientPhoto = \"https://i.vimeocdn.com/video/558921296.jpg\";\r\n vm.clickGoForHowItToWorkForCandidatePage = clickGoForHowItToWorkForCandidatePage;\r\n vm.clickGoForHowItToWorkForClientPage = clickGoForHowItToWorkForClientPage;\r\n\r\n function clickGoForHowItToWorkForCandidatePage() {\r\n $location.hash('for_candidate');\r\n $anchorScroll();\r\n }\r\n\r\n function clickGoForHowItToWorkForClientPage() {\r\n $location.hash('for_business');\r\n $anchorScroll();\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('CorporateCotroller', CorporateCotroller);\r\n\r\n /** @ngInject */\r\n function CorporateCotroller() {\r\n\r\n var vm = this;\r\n vm.goFindOutMore = goFindOutMore;\r\n\r\n function goFindOutMore() {\r\n\r\n }\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .factory('SignupClientService', SignupClientService);\r\n function SignupClientService($http, CONFIG) {\r\n return {\r\n createClient: createClient,\r\n updateClient: updateClient,\r\n updateClientUserProfile: updateClientUserProfile,\r\n findStaffs: findStaffs,\r\n updateClientUserFull: updateClientUserFull,\r\n createBookings: createBookings,\r\n getVoucher: getVoucher\r\n };\r\n function createClient(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.create,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateClient(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.update,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateClientUserProfile(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.updateClientUserProfile,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function findStaffs(data) {\r\n if (data.dateTimeFilters && data.dateTimeFilters.length > 0) {\r\n data.dateTimeFilters[0].startDate = moment(data.dateTimeFilters[0].startDate).format(CONFIG.dateFormat);\r\n data.dateTimeFilters[0].endDate = moment(data.dateTimeFilters[0].endDate).format(CONFIG.dateFormat);\r\n data.dateTimeFilters[0].startTime = moment(data.dateTimeFilters[0].startTime).format(CONFIG.timeFormat);\r\n data.dateTimeFilters[0].endTime = moment(data.dateTimeFilters[0].endTime).format(CONFIG.timeFormat);\r\n }\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.findStaffs,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateClientUserFull(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.updateClientUserFull,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createBookings(data) {\r\n if (data.dateTimeFilters && data.dateTimeFilters.length > 0) {\r\n data.dateTimeFilters[0].startDate = moment(data.dateTimeFilters[0].startDate).format(CONFIG.dateFormat);\r\n data.dateTimeFilters[0].endDate = moment(data.dateTimeFilters[0].endDate).format(CONFIG.dateFormat);\r\n data.dateTimeFilters[0].startTime = moment(data.dateTimeFilters[0].startTime).format(CONFIG.timeFormat);\r\n data.dateTimeFilters[0].endTime = moment(data.dateTimeFilters[0].endTime).format(CONFIG.timeFormat);\r\n }\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.createBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getVoucher() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.getVoucher,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.client.signup.main, {\r\n url: '/signup',\r\n templateUrl: 'app/client/signup/signup.html',\r\n controller: 'ClientSignUpController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client\r\n })\r\n .state(CONFIG.routes.client.signup.home, {\r\n url: '/home',\r\n templateUrl: 'app/client/signup/partials/home.html',\r\n controller: 'SignUpHomeController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.findMeStaff, {\r\n url: '/findMeStaff',\r\n templateUrl: 'app/client/signup/partials/findMeStaff.html',\r\n controller: 'SignUpFindMeStaffController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.clientProfile, {\r\n url: '/profile',\r\n templateUrl: 'app/client/signup/partials/clientProfile.html',\r\n controller: 'SignUpClientProfileController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.staffRequirements, {\r\n url: '/staffRequirements',\r\n templateUrl: 'app/client/signup/partials/staffRequirements.html',\r\n controller: 'SignUpStaffRequirementsController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.candidates, {\r\n url: '/candidates',\r\n templateUrl: 'app/client/signup/partials/candidates.html',\r\n controller: 'SignUpCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.finish, {\r\n url: '/finishRegistration',\r\n params : {type : null},\r\n templateUrl: 'app/client/signup/partials/finish.html',\r\n controller: 'SignUpFinishController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.signup.confirmEmail, {\r\n url: '/confirmEmail/?id&code',\r\n templateUrl: 'app/client/signup/partials/confirmEmail.html',\r\n controller: 'SignUpClientConfirmEmailController',\r\n controllerAs: 'vm'\r\n })\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ClientSignUpController', SignUpController);\r\n\r\n /** @ngInject */\r\n function SignUpController() {\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('lx.client')\r\n .factory('ClientPortalService', ClientPortalService);\r\n\r\n /** @ngInject */\r\n function ClientPortalService($uibModal, CONFIG, $http) {\r\n return {\r\n openCancelBookingConfirmModal: openCancelBookingConfirmModal,\r\n openConfirmCancellationModal: openConfirmCancellationModal,\r\n openEmploymentStatusModal: openEmploymentStatusModal,\r\n openReasonRefuseModal: openReasonRefuseModal,\r\n openReportIssueModal: openReportIssueModal,\r\n openReportIssueMessageModal: openReportIssueMessageModal,\r\n openProfileModal: openProfileModal,\r\n openTermConditionModal: openTermConditionModal,\r\n openFutureBookingModal: openFutureBookingModal,\r\n openBookingHistoryModal: openBookingHistoryModal,\r\n getClientPreviousBookings: getClientPreviousBookings,\r\n getClientUpcomingBookings: getClientUpcomingBookings,\r\n getBooking: getBooking,\r\n reBooking: reBooking,\r\n amentBooking: amentBooking,\r\n refuseRequestBooking: refuseRequestBooking,\r\n getAcceptedBooking: getAcceptedBooking,\r\n updateClientUserContact: updateClientUserContact,\r\n getNotifications: getNotifications,\r\n getCandidateRateByClient: getCandidateRateByClient,\r\n rateCandidate: rateCandidate,\r\n paidBooking: paidBooking,\r\n getBookingCandidate: getBookingCandidate,\r\n getClientRequestBookings: getClientRequestBookings,\r\n cancelledBooking: cancelledBooking,\r\n reportOtherIssueBooking: reportOtherIssueBooking,\r\n getCandidateUserById: getCandidateUserById,\r\n calculatorAmount: calculatorAmount,\r\n sendClientConfirmEmail: sendClientConfirmEmail,\r\n permanentRole: permanentRole,\r\n sendClientConfirmEmailViaPhoneNumber: sendClientConfirmEmailViaPhoneNumber,\r\n getVATBooking: getVATBooking,\r\n redeemVoucherCode: redeemVoucherCode,\r\n requestDeleteAccount: requestDeleteAccount,\r\n receivingEmail: receivingEmail\r\n };\r\n function openCancelBookingConfirmModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/cancelBookingConfirm.html',\r\n controller: 'CancelBookingConfirmController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openConfirmCancellationModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/confirmCancellation.html',\r\n controller: 'ConfirmCancellationController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openEmploymentStatusModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/employmentStatus.html',\r\n controller: 'EmploymentStatusController',\r\n controllerAs: 'vm',\r\n size: 'sm'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n\r\n function openReasonRefuseModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/reasonRefuse.html',\r\n controller: 'ReasonRefuseController',\r\n controllerAs: 'vm',\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openReportIssueModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/reportIssue.html',\r\n controller: 'ReportIssueModalController',\r\n controllerAs: 'vm',\r\n size: 'md',\r\n resolve: {\r\n booking: booking\r\n }\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openReportIssueMessageModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/reportIssueMessage.html',\r\n controller: 'ReportIssueMessageModalController',\r\n controllerAs: 'vm',\r\n size: 'md',\r\n resolve: {\r\n booking: booking\r\n }\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openProfileModal(profile) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/profileModal.html',\r\n controller: 'ProfileModalController',\r\n controllerAs: 'vm',\r\n size: 'md profile-modal',\r\n resolve: {\r\n profile: profile\r\n }\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openTermConditionModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/termCondition.html',\r\n controller: 'TermConditionModalController',\r\n controllerAs: 'vm',\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openFutureBookingModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/futureBookings.html',\r\n controller: 'FutureBookingClientController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openBookingHistoryModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/client/portal/modal/bookingsHistory.html',\r\n controller: 'BookingHistoryClientController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function getClientUpcomingBookings(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getClientUpcomingBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getClientRequestBookings() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getClientRequestBookings\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getClientPreviousBookings(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getClientPreviousBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function cancelledBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.cancelBookingByClient + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function reportOtherIssueBooking(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.reportOtherIssueBooking + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function reBooking(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.reBooking + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function amentBooking(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.amentBooking + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getAcceptedBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getAcceptedBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateClientUserContact(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.updateClientUserContact,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function refuseRequestBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.refuseRequestBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getNotifications() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.notification.getClientNotifications\r\n };\r\n return $http(req);\r\n }\r\n\r\n function rateCandidate(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.rateCandidate + \"?bookingCandidateId=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getCandidateRateByClient(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.getCandidateRateByClient + \"?bookingCandidateId=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function paidBooking(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.paidBooking + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getBookingCandidate(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getBookingCandidate + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getCandidateUserById(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getCandidateUserById + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function calculatorAmount(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.calculatorAmount + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function sendClientConfirmEmail(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.sendClientConfirmEmail + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function sendClientConfirmEmailViaPhoneNumber(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.signup.sendClientConfirmEmailViaPhoneNumber + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getVATBooking() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getVATBooking\r\n };\r\n return $http(req);\r\n }\r\n\r\n function permanentRole(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.permanentRole,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function redeemVoucherCode(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.redeemVoucherCode + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function requestDeleteAccount(){\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.requestDeleteAccount,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function receivingEmail(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.client.receivingEmail,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.client.portal.main, {\r\n url: '/portal',\r\n templateUrl: 'app/client/portal/portal.html',\r\n controller: 'ClientPortalController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client\r\n\r\n })\r\n .state(CONFIG.routes.client.portal.welcomeBack, {\r\n url: '/welcome-back',\r\n templateUrl: 'app/client/portal/partials/welcome-back.html',\r\n controller: 'HomePageClientController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.findTheStaff, {\r\n url: '/find-the-staff',\r\n controller: 'FindMeStaffController',\r\n controllerAs: 'vm',\r\n templateUrl: 'app/client/portal/partials/find-the-staff.html',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.contactStaff, {\r\n url: '/contact-staff',\r\n templateUrl: 'app/client/portal/partials/contact-staff.html',\r\n controller: \"ContactStaffController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.companyProfile, {\r\n url: '/company-profile',\r\n templateUrl: 'app/client/portal/partials/company-profile.html',\r\n controller: 'CompanyProfileController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.bookingsInformation, {\r\n url: '/bookings-information',\r\n templateUrl: 'app/client/portal/partials/bookings-information.html',\r\n controller: 'BookingsInformationController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.makePayment, {\r\n url: '/make-payment/:id',\r\n templateUrl: 'app/client/portal/partials/make-payment.html',\r\n controller: 'MakePaymentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.reportIssue, {\r\n url: '/report-issue',\r\n templateUrl: 'app/client/portal/partials/report-issue.html',\r\n controller: 'ReportIssueController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.howCommunicate, {\r\n url: '/how-communicate',\r\n templateUrl: 'app/client/portal/partials/how-communicate.html',\r\n controller: 'ClientHowCommunicateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.amendBooking, {\r\n url: '/amend-booking/:id',\r\n templateUrl: 'app/client/portal/partials/amend-booking.html',\r\n controller: \"AmendBookingController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.reBooking, {\r\n url: '/re-booking/:id',\r\n templateUrl: 'app/client/portal/partials/re-booking.html',\r\n controller: \"ReBookingController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.confirmedBooking, {\r\n url: '/confirmed-booking/:id',\r\n templateUrl: 'app/client/portal/partials/confirmed-booking.html',\r\n controller: \"ConfirmedBookingController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.permanentRole, {\r\n url: '/permanent-role/:id',\r\n templateUrl: 'app/client/portal/partials/permanent-role.html',\r\n controller: \"PermanentRoleController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.ratingStar, {\r\n url: '/rating-star/:id',\r\n templateUrl: 'app/client/portal/partials/rating-star.html',\r\n controller: \"RatingStarClientController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n .state(CONFIG.routes.client.portal.contactCandidates, {\r\n url: '/contact-candidates',\r\n templateUrl: 'app/client/portal/partials/contact-candidates.html',\r\n controller: 'ContactCandidatesController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.client,\r\n activeTab: CONFIG.activeTab.client\r\n })\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.client')\r\n .controller('ClientPortalController', ClientPortalController);\r\n /** @ngInject */\r\n function ClientPortalController($localStorage, $state) {\r\n var vm = this;\r\n\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.searchFilter = angular.copy($localStorage.searchFilter);\r\n vm.state = $state;\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('ShowPhotoOrVideoController', ShowPhotoOrVideoController);\r\n\r\n /** @ngInject */\r\n function ShowPhotoOrVideoController(user, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $timeout, $scope) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.isPlay = true;\r\n vm.isImage = false;\r\n vm.isVideo = false;\r\n vm.isHasVideo = false;\r\n vm.resultImage = null;\r\n vm.isHasImage = false;\r\n vm.uploadFiles = uploadFiles;\r\n vm.selectFile = selectFile;\r\n vm.removeFiles = removeFiles;\r\n vm.getApiFunction = getApiFunction;\r\n vm.cropImageApi = null;\r\n vm.onUpdateVideoOrPhoto = onUpdateVideoOrPhoto;\r\n vm.checkTypeFile = checkTypeFile;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.myButtonLabels = CONFIG.buttonLabels;\r\n\r\n vm.user = user;\r\n vm.removeFiles = removeFiles;\r\n active();\r\n function active() {\r\n checkHasPhotoOrVideo();\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.dismiss('cancel');\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.user.profile.photoUrl || vm.user.profile.videoUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeUserPhotoAndVideo(vm.user.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.user.profile.photoUrl = null;\r\n vm.user.profile.videoUrl = null;\r\n vm.user.profile.videoType = null;\r\n checkHasPhotoOrVideo()\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.emailMessage = error.data.exceptionMessage;\r\n });\r\n vm.isHasImage = false;\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.files) {\r\n vm.files = null;\r\n }\r\n if (vm.isImage) {\r\n vm.isImage = false\r\n }\r\n if (vm.isHasVideo) {\r\n vm.isHasVideo = false\r\n }\r\n }\r\n\r\n function checkHasPhotoOrVideo() {\r\n if (vm.user.profile.photoUrl && !vm.user.profile.videoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasPhoto = true;\r\n } else {\r\n vm.isHasPhoto = false;\r\n }\r\n if (vm.user.profile.videoUrl && vm.user.profile.photoUrl && !vm.isImage && !vm.isHasImage && !vm.isHasVideo) {\r\n vm.isHasVideo = true;\r\n } else {\r\n vm.isHasVideo = false;\r\n }\r\n\r\n }\r\n\r\n function uploadFiles() {\r\n if (vm.cropImageApi) {\r\n vm.resultImage = vm.cropImageApi.crop();\r\n }\r\n if (vm.files) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + vm.user.id,\r\n data: {\r\n file: vm.isVideo ? vm.files : Upload.dataUrltoBlob(vm.resultImage, vm.files.name)\r\n }\r\n }).then(function (response) {\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile === 1) {\r\n vm.isImage = false;\r\n vm.isHasImage = true;\r\n vm.user.profile.videoType = null;\r\n vm.user.profile.photoUrl = '';\r\n vm.user.profile.photoUrl = response.data[0].url;\r\n onUpdateVideoOrPhoto();\r\n }\r\n if (typeFile === 2) {\r\n vm.user.profile.videoUrl = '';\r\n vm.user.profile.videoType = response.data[0].fileType;\r\n vm.user.profile.videoUrl = response.data[0].url;\r\n vm.user.profile.photoUrl = response.data[0].url_Thumbnail;\r\n vm.isHasVideo = true;\r\n $rootScope.loading = false;\r\n }\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n vm.isHasVideo = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n });\r\n }\r\n }\r\n\r\n function selectFile($files) {\r\n if ($files.length > 0) {\r\n vm.file = $files[0];\r\n var type = checkTypeFile(vm.file.type);\r\n if (vm.file) {\r\n\r\n $timeout(function () {\r\n var imgSrc = URL.createObjectURL(vm.file);\r\n if (type == 1) {\r\n vm.isImage = true;\r\n vm.user.profile.videoType = null;\r\n if (vm.user.profile.videoUrl) {\r\n vm.user.profile.videoUrl = null;\r\n }\r\n }\r\n if (type == 2) {\r\n if (vm.file.size >= 50000000) {\r\n vm.files = null;\r\n vm.fileOnlyUpload = \"Sorry! LB X-Change is supporting file under 50mb\";\r\n return;\r\n }\r\n vm.isVideo = true;\r\n vm.isPlay = true;\r\n vm.user.profile.videoType = vm.file.type;\r\n if (vm.user.profile.photoUrl) {\r\n vm.user.profile.photoUrl = null;\r\n }\r\n uploadFiles();\r\n }\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasImage = false;\r\n vm.fileUrl = imgSrc;\r\n $files = [];\r\n // $scope.$apply();\r\n }\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function getApiFunction(api) {\r\n vm.cropImageApi = api;\r\n\r\n }\r\n\r\n function checkNameFile(filename) {\r\n var n = filename.split(\".\");\r\n return n[n.length - 1];\r\n\r\n }\r\n\r\n function checkTypeFile(filename) {\r\n var ext = filename.split(\"/\");\r\n if (ext[0].toLowerCase() == \"image\") {\r\n return 1\r\n }\r\n if (ext[0].toLowerCase() == \"video\") {\r\n return 2\r\n }\r\n return\r\n }\r\n\r\n function onUpdateVideoOrPhoto() {\r\n vm.user.id = vm.user.id || vm.user.profile.id;\r\n var typeFile = checkTypeFile(vm.files.type);\r\n if (typeFile == 1) {\r\n AdminService.updateUserPhoto(vm.user).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.user = data.data.result;\r\n $uibModalInstance.close({\r\n user: vm.user\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n } else if (typeFile == 2) {\r\n $rootScope.loading = true;\r\n AdminService.updateUserVideo(vm.user).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.user = data.data.result;\r\n $uibModalInstance.close({\r\n user: vm.user\r\n });\r\n }, function (error) {\r\n $rootScope.loading = 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\r\n .module('lx')\r\n .controller('ShowPassportController', ShowPassportController);\r\n\r\n /** @ngInject */\r\n function ShowPassportController(user, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $timeout) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.user = user;\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n if (vm.user.profile.passportUrl !== null) {\r\n vm.pdfFileCurrent = vm.user.profile.passportUrl;\r\n vm.pdfFileCurrent = vm.pdfFileCurrent.split(\".\").pop();\r\n }\r\n vm.selectPassportImageLast = function ($files) {\r\n if (vm.passportFile) {\r\n vm.photoFile = vm.passportFile.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile == \"pdf\") {\r\n vm.showImgFile = false;\r\n vm.showPdfFile = true;\r\n } else {\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n }\r\n }\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasLastPassportImage = true;\r\n vm.filePassportUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n vm.removePassportFiles = function () {\r\n if (vm.user.profile.passportUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeUserPassport(vm.user.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.user = data.data.result;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n if (vm.filePassportUrl) {\r\n vm.filePassportUrl = null;\r\n }\r\n if (vm.isHasLastPassportImage) {\r\n vm.isHasLastPassportImage = false\r\n }\r\n }\r\n vm.updateUserPassport = function () {\r\n if (vm.passportFile) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + user.id,\r\n data: {\r\n file: vm.passportFile\r\n }\r\n }).then(function (response) {\r\n vm.user.profile.passportUrl = response.data[0].url;\r\n AdminService.updateUserPassport(vm.user).then(function (data) {\r\n vm.user = data.data.result;\r\n vm.pdfFile = user.profile.passportUrl.split(\".\").pop();\r\n $rootScope.loading = false;\r\n $uibModalInstance.close({ user: vm.user });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n errorMsg = response.status + ': ' + response.data;\r\n }\r\n });\r\n }\r\n }\r\n\r\n function cancel() {\r\n $uibModalInstance.close({ user: vm.user });\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('ShowInsuranceCodeController', ShowInsuranceCodeController);\r\n\r\n /** @ngInject */\r\n function ShowInsuranceCodeController(user, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $scope) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.user = user;\r\n\r\n function cancel() {\r\n $uibModalInstance.close({user: vm.user});\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('ShowDocumentController', ShowDocumentController);\r\n\r\n /** @ngInject */\r\n function ShowDocumentController(user, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $timeout) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.user = user;\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n if (vm.user.profile.documentUrl !== null) {\r\n vm.pdfFileCurrent = vm.user.profile.documentUrl;\r\n vm.pdfFileCurrent = vm.pdfFileCurrent.split(\".\").pop();\r\n }\r\n vm.selectDocumentImageLast = function ($files) {\r\n if (vm.documentFile) {\r\n vm.photoFile = vm.documentFile.name;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile == \"pdf\") {\r\n vm.showImgFile = false;\r\n vm.showPdfFile = true;\r\n } else {\r\n vm.showImgFile = true;\r\n vm.showPdfFile = false;\r\n }\r\n }\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $timeout(function () {\r\n vm.isHasLastDocumentImage = true;\r\n vm.fileDocumentUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n };\r\n\r\n vm.removeDocumentFiles = function () {\r\n if (vm.user.profile.documentUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeUserDocument(vm.user.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.user = data.data.result;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n if (vm.fileDocumentUrl) {\r\n vm.fileDocumentUrl = null;\r\n }\r\n if (vm.isHasLastDocumentImage) {\r\n vm.isHasLastDocumentImage = false\r\n }\r\n };\r\n vm.updateUserDocument = function () {\r\n if (vm.documentFile) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=\" + user.id,\r\n data: {\r\n file: vm.documentFile\r\n }\r\n }).then(function (response) {\r\n vm.user.profile.documentUrl = response.data[0].url;\r\n AdminService.updateUserDocument(vm.user).then(function (data) {\r\n vm.user = data.data.result;\r\n $rootScope.loading = false;\r\n $uibModalInstance.close({ user: vm.user });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n errorMsg = response.status + ': ' + response.data;\r\n }\r\n });\r\n }\r\n };\r\n\r\n function cancel() {\r\n $uibModalInstance.close({ user: vm.user });\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('TestSenderController', TestSenderController);\r\n\r\n /** @ngInject */\r\n function TestSenderController(sender, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $scope) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.copyOfEmailTemplate = null;\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.sender = sender;\r\n active();\r\n function active() {\r\n }\r\n\r\n vm.onTestSender = function () {\r\n $rootScope.loading = true;\r\n AdminService.testSenderSchedule(vm.sender).then(function (data) {\r\n $uibModalInstance.close();\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n });\r\n };\r\n function cancel() {\r\n $uibModalInstance.close({ voucher: vm.currentSender });\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('EditVoucherController', EditVoucherController);\r\n\r\n /** @ngInject */\r\n function EditVoucherController(voucher, $uibModalInstance, CONFIG, AdminService, $rootScope, $timeout, $scope) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.vouchers = [];\r\n vm.checkExpiry = false;\r\n vm.checkExpiryOverLimit = false;\r\n vm.dateOptions = {\r\n minDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1)\r\n };\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.voucher = voucher;\r\n if (vm.voucher) {\r\n vm.voucher.expiry = vm.voucher.expiry ? new Date(vm.voucher.expiry) : ''\r\n }\r\n vm.currentVoucher = angular.copy(voucher);\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.resetCheckExpiry = resetCheckExpiry;\r\n vm.checkExpiryDate = checkExpiryDate;\r\n vm.checkIsExistedVoucher = checkIsExistedVoucher;\r\n vm.resetErrorExistedVoucher = resetErrorExistedVoucher;\r\n vm.onEditVoucher = function () {\r\n $rootScope.loading = true;\r\n AdminService.updateVoucherByAdmin(vm.voucher).then(function (data) {\r\n vm.voucher = data.data.result;\r\n $rootScope.loading = false;\r\n $uibModalInstance.close({voucher: vm.voucher});\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n };\r\n\r\n function cancel() {\r\n $uibModalInstance.close({voucher: vm.currentVoucher});\r\n }\r\n\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n\r\n function resetCheckExpiry() {\r\n vm.checkExpiry = false;\r\n }\r\n\r\n function checkExpiryDate(expiryDate) {\r\n vm.checkExpiry = true;\r\n if (expiryDate && expiryDate.getTime() < vm.dateOptions.minDate.getTime()) {\r\n vm.checkExpiryOverLimit = true;\r\n } else {\r\n vm.checkExpiryOverLimit = false;\r\n }\r\n\r\n }\r\n\r\n function checkIsExistedVoucher(form, code) {\r\n if(code === vm.currentVoucher.code){\r\n form.code.$setValidity(\"codeExists\", true);\r\n }else {\r\n AdminService.checkIsExistedVoucher(code).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.code.$setValidity(\"codeExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.code.$setValidity(\"codeExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('codeExists', false);\r\n }, 1000);\r\n })\r\n }\r\n }\r\n function resetErrorExistedVoucher(form) {\r\n form.$setValidity('codeExists', 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('lx')\r\n .controller('EditSenderController', EditSenderController);\r\n\r\n /** @ngInject */\r\n function EditSenderController(sender, $uibModalInstance, CONFIG, AdminService, $rootScope, Upload, $scope, dataList) {\r\n var vm = this;\r\n vm.cancel = cancel;\r\n vm.copyOfEmailTemplate = null;\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.sender = sender;\r\n if (sender.emailTemplateUrl) {\r\n vm.emailTemplateUrl = sender.emailTemplateUrl.replace(/^.*[\\\\\\/]/, '');\r\n }\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n loadSendToVariables();\r\n loadSendFromVariables();\r\n loadSendFirstVariables();\r\n loadSendFrequencyVariables();\r\n getTypeOfWork();\r\n }\r\n\r\n function loadSendToVariables() {\r\n AdminService.getSendToVariables().then(function (data) {\r\n vm.sendToVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFromVariables() {\r\n AdminService.getSendFromVariables().then(function (data) {\r\n vm.sendFromVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFirstVariables() {\r\n AdminService.getSendFirstVariables().then(function (data) {\r\n vm.sendFirstVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFrequencyVariables() {\r\n AdminService.getSendFrequencyVariables().then(function (data) {\r\n vm.sendFrequencyVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n vm.onEditSender = function () {\r\n $rootScope.loading = true;\r\n if (vm.copyOfEmailTemplate) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=Templates\",\r\n data: {\r\n file: vm.copyOfEmailTemplate\r\n }\r\n }).then(function (response) {\r\n vm.sender.emailTemplateUrl = response.data[0].url;\r\n AdminService.updateSettingSenderSchedule(vm.sender).then(function (data) {\r\n vm.sender = data.data.result;\r\n $uibModalInstance.close({sender: vm.sender});\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n else {\r\n AdminService.updateSettingSenderSchedule(vm.sender).then(function (data) {\r\n vm.sender = data.data.result;\r\n $rootScope.loading = false;\r\n $uibModalInstance.close({sender: vm.sender});\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n };\r\n function cancel() {\r\n $uibModalInstance.close({voucher: vm.currentSender});\r\n }\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\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('lx')\r\n .controller('ShowEditLandingPageController', ShowEditLandingPageController);\r\n\r\n /** @ngInject */\r\n function ShowEditLandingPageController(landingPage, $uibModalInstance, $location, ngToast, CONFIG, AdminService, $rootScope, $timeout, $state) {\r\n var vm = this;\r\n vm.pageTypes = [];\r\n vm.landingPage = landingPage;\r\n vm.currentLandingPage = angular.copy(landingPage);\r\n vm.baseUrl = document.querySelector('base').href;\r\n vm.cancel = cancel;\r\n vm.checkUrlExists = checkUrlExists;\r\n vm.resetErrorUrlExists = resetErrorUrlExists;\r\n vm.onSubmitLandingPage = onSubmitLandingPage;\r\n vm.onDeleteLandingPage = onDeleteLandingPage;\r\n active();\r\n function active() {\r\n getPageTypes();\r\n getDefaultUrl();\r\n }\r\n\r\n function getPageTypes() {\r\n AdminService.getPageTypes().then(function (res) {\r\n vm.pageTypes = res.data.result.items;\r\n });\r\n }\r\n\r\n function getDefaultUrl() {\r\n if (vm.landingPage && (vm.landingPage.url == null || vm.landingPage.url == '')) {\r\n AdminService.getLandingPageDefaultUrl().then(function (res) {\r\n vm.landingPage.url = res.data.result;\r\n });\r\n }\r\n }\r\n\r\n function onSubmitLandingPage() {\r\n $rootScope.loading = true;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n $uibModalInstance.close({landingPage: vm.landingPage});\r\n goToManageLandingPage();\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n };\r\n function onDeleteLandingPage() {\r\n $rootScope.loading = true;\r\n AdminService.deleteLandingPage(vm.landingPage.id).then(function (res) {\r\n vm.landingPage = {};\r\n $uibModalInstance.close({landingPage: vm.landingPage});\r\n goToManageLandingPage();\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n };\r\n\r\n function cancel() {\r\n $uibModalInstance.close({landingPage: vm.currentLandingPage});\r\n }\r\n\r\n function checkUrlExists(form, url) {\r\n if (url === vm.currentLandingPage.url) {\r\n form.url.$setValidity(\"urlExists\", true);\r\n } else {\r\n AdminService.checkLandingPageUrlExists(vm.landingPage).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('urlExists', false);\r\n }, 1000);\r\n })\r\n }\r\n }\r\n\r\n function resetErrorUrlExists(form) {\r\n form.$setValidity('urlExists', true);\r\n };\r\n\r\n function goToManageLandingPage() {\r\n $state.go(CONFIG.routes.admin.manageLandingPage);\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('DeleteUserModal', DeleteUserModal);\r\n\r\n /** @ngInject */\r\n function DeleteUserModal(AdminService, user, $uibModalInstance, $rootScope, ngToast) {\r\n var vm = this;\r\n vm.user = user;\r\n vm.close = close;\r\n vm.deleteUser = deleteUser;\r\n\r\n function close() {\r\n $uibModalInstance.close(false);\r\n }\r\n\r\n function deleteUser() {\r\n $rootScope.loading = true;\r\n AdminService.deleteUser(vm.user.id).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Delete user successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Delete user unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $uibModalInstance.close(false);\r\n });\r\n }\r\n }\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('DeleteSenderModal', DeleteSenderModal);\r\n\r\n /** @ngInject */\r\n function DeleteSenderModal(AdminService, sender, $uibModalInstance, $rootScope, ngToast) {\r\n var vm = this;\r\n vm.sender = sender;\r\n vm.close = close;\r\n vm.deleteSender = deleteSender;\r\n\r\n function close() {\r\n $uibModalInstance.close(false);\r\n }\r\n\r\n function deleteSender() {\r\n $rootScope.loading = true;\r\n AdminService.deleteSender(vm.sender.id).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Delete sender successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Delete sender unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $uibModalInstance.close(false);\r\n });\r\n }\r\n }\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('DeleteJobModalController', DeleteJobModalController);\r\n\r\n /** @ngInject */\r\n function DeleteJobModalController(JobService, job, $uibModalInstance, $rootScope, ngToast) {\r\n var vm = this;\r\n vm.job = job;\r\n vm.close = close;\r\n vm.deleteJob = deleteJob;\r\n\r\n function close() {\r\n $uibModalInstance.close(false);\r\n }\r\n\r\n function deleteJob() {\r\n $rootScope.loading = true;\r\n JobService.deleteJobByAdmin(vm.job.id).then(function () {\r\n $uibModalInstance.close(true);\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Delete job successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Delete job unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $uibModalInstance.close(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('lx.admin', []);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.admin')\r\n .controller('SMSSenderController', SMSSenderController);\r\n\r\n /** @ngInject */\r\n function SMSSenderController(AdminService, $rootScope, Upload, ngToast, $scope, CONFIG, $state, $uibModal, dataList) {\r\n\r\n var vm = this;\r\n vm.propertyName = 'senderName';\r\n vm.propertyNameExtend = 'senderName';\r\n vm.reverse = false;\r\n vm.reverse = false;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.sortBy = sortBy;\r\n vm.candidatePageNo = 1;\r\n vm.candidatePageSize = 100;\r\n vm.clientPageNo = 1;\r\n vm.clientPageSize = 100;\r\n vm.smsSender = {};\r\n vm.smsSender.distance = CONFIG.distance;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.onCreateSMSSender = onCreateSMSSender;\r\n vm.openModalEditSender = openModalEditSender;\r\n vm.openModalDeleteSender = openModalDeleteSender;\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n loadSendToVariables();\r\n loadSendFirstVariables();\r\n loadSendFrequencyVariables();\r\n loadSMSSenders();\r\n getTypeOfWork();\r\n }\r\n\r\n function loadSendToVariables() {\r\n AdminService.getSendToVariables().then(function (data) {\r\n vm.sendToVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFirstVariables() {\r\n AdminService.getSendFirstVariables().then(function (data) {\r\n vm.sendFirstVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFrequencyVariables() {\r\n AdminService.getSendFrequencyVariables().then(function (data) {\r\n vm.sendFrequencyVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSMSSenders() {\r\n $rootScope.loading = true;\r\n AdminService.getSMSSenders().then(function (data) {\r\n vm.smsSenders = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function onCreateSMSSender() {\r\n $rootScope.loading = true;\r\n vm.smsSender.senderType = 1;\r\n AdminService.createSettingSenderSchedule(vm.smsSender).then(function (data) {\r\n loadSMSSenders();\r\n vm.smsSender = {};\r\n vm.registerSMSSenderForm.$setUntouched();\r\n vm.registerSMSSenderForm.$setPristine();\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function openModalEditSender(sender) {\r\n var v = JSON.parse(angular.toJson(sender));\r\n AdminService.showEditSenderModal(v).then(function (res) {\r\n loadSMSSenders();\r\n });\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function openModalDeleteSender(sender) {\r\n AdminService.showDeleteSenderModal(sender).then(function (isDeleted) {\r\n if (isDeleted) {\r\n vm.smsSenders = vm.smsSenders.filter(function (data) {\r\n return data.id !== sender.id;\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('lx.admin')\r\n .controller('RegisterVoucherController', RegisterVoucherController);\r\n\r\n /** @ngInject */\r\n function RegisterVoucherController(AdminService, $rootScope, $filter, CONFIG, $state, $uibModal, $timeout) {\r\n\r\n var vm = this;\r\n vm.propertyName = 'expiry';\r\n vm.propertyNameExtend = 'expiry';\r\n vm.reverse = true;\r\n vm.sortBy = sortBy;\r\n vm.pageNo = 1;\r\n vm.pageSize = 10;\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.vouchers = [];\r\n vm.checkExpiry = false;\r\n vm.checkExpiryOverLimit = false;\r\n vm.dateOptions = {\r\n minDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1)\r\n };\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.loadMoreVoucher = loadMoreVoucher;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.onCreateVoucher = onCreateVoucher;\r\n vm.resetCheckExpiry = resetCheckExpiry;\r\n vm.checkExpiryDate = checkExpiryDate;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.checkIsExistedVoucher = checkIsExistedVoucher;\r\n vm.resetErrorExistedVoucher = resetErrorExistedVoucher;\r\n vm.openModalEditVoucher = openModalEditVoucher;\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n AdminService.getVouchersByAdmin({PageNo: vm.pageNo, PageSize: vm.pageSize}).then(function (data) {\r\n vm.vouchers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.vouchers.length == 0) {\r\n vm.listVoucherResponse = 'No user';\r\n } else if (vm.vouchers.length < vm.totalUserCount) {\r\n vm.loadMoreVoucherCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listVoucherResponse = 'No voucher';\r\n })\r\n\r\n }\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n\r\n function resetCheckExpiry() {\r\n vm.checkExpiry = false;\r\n }\r\n\r\n function checkExpiryDate(expiryDate) {\r\n vm.checkExpiry = true;\r\n if (expiryDate && expiryDate.getTime() < vm.dateOptions.minDate.getTime()) {\r\n vm.checkExpiryOverLimit = true;\r\n } else {\r\n vm.checkExpiryOverLimit = false;\r\n }\r\n\r\n }\r\n\r\n function loadMoreVoucher() {\r\n if (vm.loadMoreVoucherCount) {\r\n vm.pageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getVouchersByAdmin({PageNo: vm.pageNo, PageSize: vm.pageSize}).then(function (data) {\r\n vm.vouchers = vm.vouchers.concat(data.data.result.items);\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.vouchers.length >= vm.totalUserCount) {\r\n vm.loadMoreVoucherCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listVoucherResponse = 'No voucher';\r\n })\r\n }\r\n\r\n }\r\n\r\n function onCreateVoucher() {\r\n $rootScope.loading = true;\r\n AdminService.createVoucherByAdmin(vm.voucher).then(function (res) {\r\n vm.vouchers.push(res.data.result);\r\n vm.totalUserCount = vm.totalUserCount + 1;\r\n $rootScope.loading = false;\r\n vm.voucher = {};\r\n vm.registerVoucherForm.$setUntouched();\r\n vm.registerVoucherForm.$setPristine();\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n\r\n }\r\n\r\n function checkIsExistedVoucher(form, code) {\r\n AdminService.checkIsExistedVoucher(code).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.code.$setValidity(\"codeExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.code.$setValidity(\"codeExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('codeExists', false);\r\n }, 1000);\r\n })\r\n\r\n }\r\n\r\n function resetErrorExistedVoucher(form) {\r\n form.$setValidity('codeExists', true);\r\n };\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function openModalEditVoucher(voucher) {\r\n var v = JSON.parse(angular.toJson(voucher))\r\n AdminService.showEditVoucherModal(v).then(function (res) {\r\n var index = vm.vouchers.map(function(v){return v.id}).indexOf(res.voucher.id);\r\n vm.vouchers[~index?index:vm.vouchers.length] = res.voucher;\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('lx.admin')\r\n .controller('ReceivingEmailPageController', ReceivingEmailPageController);\r\n\r\n /** @ngInject */\r\n function ReceivingEmailPageController(AdminService, $filter, $rootScope, CONFIG, $state) {\r\n var vm = this;\r\n vm.isAllowUserStopReceivingEmail = false;\r\n vm.onSearchUser = onSearchUser;\r\n vm.loadMoreUser = loadMoreUser;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.changeStatus = changeStatus;\r\n vm.receivingEmail = receivingEmail;\r\n vm.listReceivingEmailStatus = CONFIG.receivingEmail;\r\n vm.receivingEmailStatusFilter = receivingEmailStatusFilter;\r\n vm.reverse = false;\r\n vm.sortBy = sortBy;\r\n vm.listUsers = [];\r\n vm.deleteUserPage = {};\r\n vm.search = {\r\n emailAddress: null,\r\n pageNo: 1,\r\n pageSize: 20\r\n };\r\n vm.filter = {\r\n emailAddress: null,\r\n status: {\r\n IsAccepted: false,\r\n IsRequested: true,\r\n IsAllowed: false\t\r\n },\r\n pageNo: 1,\r\n pageSize: 20\r\n };\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersWantToStopReceivingEmail(vm.filter).then(function (data) {\r\n vm.listUsers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length == 0) {\r\n vm.listUsersResponse = 'No user';\r\n } else if (vm.listUsers.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n\r\n function loadMoreUser() {\r\n if (vm.loadMoreUserCount) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersWantToStopReceivingEmail(vm.filter).then(function (data) {\r\n vm.listUsers = vm.listUsers.concat(data.data.result.items);\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length >= vm.totalUserCount) {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n }\r\n\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function onSearchUser() {\r\n vm.filter.pageNo = 1;\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersWantToStopReceivingEmail(vm.search).then(function (data) {\r\n vm.listUsers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length == 0) {\r\n vm.listUsersResponse = 'No user';\r\n } else {\r\n vm.listUsersResponse = '';\r\n }\r\n if (vm.listUsers.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n } else {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n\r\n function receivingEmailStatusFilter() {\r\n vm.filter.pageNo = 1;\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersWantToStopReceivingEmail(vm.filter).then(function (data) {\r\n vm.listUsers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length == 0) {\r\n vm.listUsersResponse = 'No user';\r\n } else if (vm.listUsers.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n } else {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n });\r\n };\r\n\r\n function changeStatus(receivingEmailStatus,id) {\r\n $rootScope.loading = true;\r\n var dataReq = {\r\n receivingEmailStatus: receivingEmailStatus,\r\n id: id\r\n };\r\n AdminService.receivingEmail(dataReq).then(function () {\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function receivingEmail(status) {\r\n var item = $filter('filter')(CONFIG.receivingEmail, status);\r\n return item[0].status;\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.admin')\r\n .controller('ManageBookingController', ManageBookingController);\r\n\r\n /** @ngInject */\r\n function ManageBookingController(AdminService, $rootScope, $filter, CONFIG, $state, $element, FileSaver, $log, dataList) {\r\n var vm = this;\r\n vm.propertyName = 'status';\r\n vm.propertyNameExtend = 'status';\r\n vm.reverse = false;\r\n vm.sortBy = sortBy;\r\n vm.pageNo = 1;\r\n vm.pageSize = 10;\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = false;\r\n vm.isCollapsedFilter = false;\r\n vm.search = {\r\n pageNo: 1,\r\n pageSize: 10\r\n };\r\n vm.filter = {\r\n pageNo: 1,\r\n pageSize: 10\r\n };\r\n\r\n vm.listBooking = [];\r\n vm.listBookingOrigin = [];\r\n vm.loadMoreBooking = loadMoreBooking;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.bookingStatus = bookingStatus;\r\n vm.candidateType = CONFIG.candidateType;\r\n vm.exportBookings = exportBookings;\r\n vm.getTypeOfWork = getTypeOfWork;\r\n vm.getKeySkills = getKeySkills;\r\n vm.onSearchBooking = onSearchBooking;\r\n vm.toggleFilterButton = toggleFilterButton;\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n AdminService.getBookingsByAdmin({PageNo: vm.pageNo, PageSize: vm.pageSize}).then(function (data) {\r\n vm.listBookingOrigin = data.data.result.items;\r\n vm.listBooking = vm.listBookingOrigin;\r\n vm.totalBookingCount = data.data.result.totalCount;\r\n if (vm.listBooking.length == 0) {\r\n vm.listBookingResponse = 'No booking';\r\n } else if (vm.listBooking.length < vm.totalBookingCount) {\r\n vm.loadMoreBookingCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $log.error(error);\r\n $rootScope.loading = false;\r\n vm.listBookingResponse = 'No booking';\r\n })\r\n getTypeOfWork();\r\n getKeySkills();\r\n getWorkExperiences();\r\n }\r\n\r\n function loadMoreBooking() {\r\n if (vm.loadMoreBookingCount) {\r\n vm.pageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getBookingsByAdmin({PageNo: vm.pageNo, PageSize: vm.pageSize}).then(function (data) {\r\n vm.listBookingOrigin = vm.listBookingOrigin.concat(data.data.result.items);\r\n vm.listBooking = vm.listBookingOrigin;\r\n vm.totalBookingCount = data.data.result.totalCount;\r\n if (vm.listBooking.length >= vm.totalBookingCount) {\r\n vm.loadMoreBookingCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $log.error(error);\r\n $rootScope.loading = false;\r\n vm.listBookingResponse = 'No booking';\r\n })\r\n }\r\n\r\n }\r\n\r\n function onSearchBooking() {\r\n vm.filter.pageNo = 1;\r\n $rootScope.loading = true;\r\n AdminService.getBookingsByAdmin(vm.search).then(function (data) {\r\n vm.listBooking = data.data.result.items;\r\n vm.totalBookingCount = data.data.result.totalCount;\r\n if (vm.listBooking.length == 0) {\r\n vm.listBookingResponse = 'No booking';\r\n } else {\r\n vm.listBookingResponse = '';\r\n }\r\n if (vm.listBooking.length < vm.totalBookingCount) {\r\n vm.loadMoreBookingCount = true;\r\n } else {\r\n vm.loadMoreBookingCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listBookingResponse = 'No booking';\r\n })\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n }\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n function bookingStatus(status){\r\n var item = $filter('filter')(CONFIG.bookingStatus, status);\r\n return item[0].status;\r\n }\r\n function exportBookings(){\r\n $rootScope.loading = true;\r\n AdminService.exportBookingsByAdmin(vm.search).then(function (res) {\r\n $rootScope.loading = false;\r\n saveData(res, \"ReportBookings.xlsx\");\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function saveData(data, fileName) {\r\n var blob = new Blob([data.data], {type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"});\r\n FileSaver.saveAs(blob, fileName);\r\n }\r\n\r\n function toggleFilterButton() {\r\n vm.isCollapsedFilter = !vm.isCollapsedFilter;\r\n }\r\n\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function getKeySkills() {\r\n dataList.getKeySkills().then(function (data) {\r\n vm.keySkills = data.data.result.items;\r\n })\r\n }\r\n\r\n function getWorkExperiences() {\r\n dataList.getKeyExperiences().then(function (data) {\r\n vm.workExperiences = data.data.result.items;\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('lx.admin')\r\n .controller('LandingPagesController', LandingPagesController);\r\n\r\n /** @ngInject */\r\n function LandingPagesController(AdminService, $rootScope, $location, Upload, ngToast, $timeout, CONFIG, $state, $uibModal) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.landingPage = {};\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n vm.copyImage = null;\r\n vm.toolbarOptions = [\r\n ['p', 'pre', 'quote'],\r\n ['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],\r\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\r\n ['html', 'insertLink']];\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.onCreateOrUpdateLandingPage = onCreateOrUpdateLandingPage;\r\n vm.onCreateLandingPage = onCreateLandingPage;\r\n vm.onEditLandingPage = onEditLandingPage;\r\n vm.openModalEditLandingPage = openModalEditLandingPage;\r\n vm.selectImage = selectImage;\r\n vm.removeFiles = removeFiles;\r\n vm.baseUrl = document.querySelector('base').href;\r\n vm.landingPageNo = 1;\r\n vm.landingPageSize = 25;\r\n vm.loadMoreLandings = loadMoreLandings;\r\n active();\r\n function active() {\r\n getListLandings();\r\n }\r\n\r\n function getListLandings() {\r\n AdminService.getListPagesByAdmin({\r\n PageNo: vm.landingPageNo,\r\n PageSize: vm.landingPageSize\r\n }).then(function (res) {\r\n vm.landingPage = res.data.result.items;\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPage.length == 0) {\r\n vm.listLandingResponse = 'No landing';\r\n } else if (vm.landingPage.length < vm.totalLanding) {\r\n vm.loadMoreLanding = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No landing';\r\n })\r\n }\r\n\r\n function loadMoreLandings() {\r\n if (vm.loadMoreLanding) {\r\n vm.landingPageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getListPagesByAdmin({\r\n PageNo: vm.landingPageNo,\r\n PageSize: vm.landingPageSize\r\n }).then(function (res) {\r\n vm.landingPage = vm.landingPage.concat(res.data.result.items);\r\n vm.totalLanding = res.data.result.totalCount;\r\n if (vm.landingPage.length >= vm.totalLanding) {\r\n vm.loadMoreLanding = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listLandingResponse = 'No landing';\r\n })\r\n }\r\n\r\n }\r\n\r\n function onCreateOrUpdateLandingPage() {\r\n var resultCompare = angular.equals(vm.landingPage, vm.landingPageTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function onCreateLandingPage() {\r\n $state.go(CONFIG.routes.admin.createLandingPage);\r\n }\r\n\r\n function onEditLandingPage(id) {\r\n $state.go(CONFIG.routes.admin.editLandingPage, {'id': id});\r\n }\r\n\r\n function openModalEditLandingPage(landingPage) {\r\n var v = JSON.parse(angular.toJson(landingPage));\r\n AdminService.showEditLandingPageModal(v).then(function (res) {\r\n vm.landingPage = res.landingPage;\r\n });\r\n }\r\n\r\n function selectImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n console.log(\"selectImage\");\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=LandingPages\",\r\n data: {\r\n file: $files\r\n }\r\n }).then(function (response) {\r\n vm.landingPage.imageUrl = response.data[0].url;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n $timeout(function () {\r\n vm.isHasImage = true;\r\n vm.fileUrl = imgSrc;\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.landingPage.imageUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeLandingPageImage(vm.landingPage.imageUrl).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.landingPage.imageUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.isHasImage) {\r\n vm.isHasImage = false\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('lx.admin')\r\n .controller('JobManagementController', JobManagementController);\r\n\r\n /** @ngInject */\r\n function JobManagementController(JobService, AdminService, $rootScope, $location, ngToast, $timeout, CONFIG, $state, $log) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.baseUrl = document.querySelector('base').href + 'jobs/';\r\n vm.jobNo = 1;\r\n vm.jobManagementize = 25;\r\n vm.loadMoreJobs = loadMoreJobs;\r\n vm.onCreateJob = onCreateJob;\r\n vm.onEditJob = onEditJob;\r\n vm.openModalDeleteJob = openModalDeleteJob;\r\n active();\r\n function active() {\r\n getListjobs();\r\n }\r\n\r\n function getListjobs() {\r\n JobService.getJobsByAdmin({\r\n PageNo: vm.jobNo,\r\n PageSize: vm.jobManagementize\r\n }).then(function (res) {\r\n vm.jobs = res.data.result.items;\r\n vm.totalJob = res.data.result.totalCount;\r\n if (vm.jobs.length == 0) {\r\n vm.listJobResponse = 'No job';\r\n } else if (vm.jobs.length < vm.totalJob) {\r\n vm.loadMoreJob = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listJobResponse = 'No job';\r\n })\r\n }\r\n\r\n function loadMoreJobs() {\r\n if (vm.loadMoreJob) {\r\n vm.jobNo++;\r\n $rootScope.loading = true;\r\n JobService.getJobsByAdmin({\r\n PageNo: vm.jobNo,\r\n PageSize: vm.jobManagementize\r\n }).then(function (res) {\r\n vm.jobs = vm.jobs.concat(res.data.result.items);\r\n vm.totalJob = res.data.result.totalCount;\r\n if (vm.job.length >= vm.totalJob) {\r\n vm.loadMoreJob = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listJobResponse = 'No job';\r\n })\r\n }\r\n\r\n }\r\n\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function onCreateJob() {\r\n $state.go(CONFIG.routes.admin.createJob);\r\n }\r\n\r\n function onEditJob(id) {\r\n $state.go(CONFIG.routes.admin.editJob, {'id': id});\r\n }\r\n function openModalDeleteJob(job) {\r\n AdminService.showDeleteJobModal(job).then(function (isDeleted) {\r\n if (isDeleted) {\r\n vm.jobs = vm.jobs.filter(function (data) {\r\n return data.id !== job.id;\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('lx.admin')\r\n .controller('ExportController', ExportController);\r\n\r\n /** @ngInject */\r\n function ExportController(AdminService, $rootScope, FileSaver, Blob, $filter, CONFIG, $state, $uibModal) {\r\n\r\n var vm = this;\r\n vm.reverse = false;\r\n vm.sortBy = sortBy;\r\n vm.candidatePageNo = 1;\r\n vm.candidatePageSize = 100;\r\n vm.clientPageNo = 1;\r\n vm.clientPageSize = 100;\r\n vm.loadMoreCandidates = loadMoreCandidates;\r\n vm.loadMoreClients = loadMoreClients;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.exportClients = exportClients;\r\n vm.exportCandidates = exportCandidates;\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n loadCandidates();\r\n loadClients();\r\n }\r\n function loadCandidates() {\r\n AdminService.getCandidatesByAdmin({PageNo: vm.candidatePageNo, PageSize: vm.candidatePageSize}).then(function (data) {\r\n vm.listCandidate = data.data.result.items;\r\n vm.totalCandidate = data.data.result.totalCount;\r\n if (vm.listCandidate.length == 0) {\r\n vm.listCandidateResponse = 'No user';\r\n } else if (vm.listCandidate.length < vm.totalCandidate) {\r\n vm.loadMoreCandidate = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n vm.listCandidateResponse = 'No user';\r\n })\r\n }\r\n function loadClients() {\r\n AdminService.getClientsByAdmin({PageNo: vm.clientPageNo, PageSize: vm.clientPageSize}).then(function (data) {\r\n vm.listClient = data.data.result.items;\r\n vm.totalClient = data.data.result.totalCount;\r\n if (vm.listClient.length == 0) {\r\n vm.listClientResponse = 'No user';\r\n } else if (vm.listClient.length < vm.totalClient) {\r\n vm.loadMoreClient = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n vm.listClientResponse = 'No user';\r\n })\r\n }\r\n function loadMoreCandidates() {\r\n if (vm.loadMoreCandidate) {\r\n vm.candidatePageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getCandidatesByAdmin({PageNo: vm.candidatePageNo, PageSize: vm.candidatePageSize}).then(function (data) {\r\n vm.listCandidate = vm.listCandidate.concat(data.data.result.items);\r\n vm.totalCandidate = data.data.result.totalCount;\r\n if (vm.listCandidate.length >= vm.totalCandidate) {\r\n vm.loadMoreCandidate = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listCandidateResponse = 'No user';\r\n })\r\n }\r\n\r\n }\r\n function loadMoreClients() {\r\n if (vm.loadMoreClient) {\r\n vm.clientPageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getClientsByAdmin({PageNo: vm.clientPageNo, PageSize: vm.clientPageSize}).then(function (data) {\r\n vm.listClient = vm.listClient.concat(data.data.result.items);\r\n vm.totalClient = data.data.result.totalCount;\r\n if (vm.listClient.length >= vm.totalClient) {\r\n vm.loadMoreClient = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n vm.listClientResponse = 'No user';\r\n })\r\n }\r\n\r\n }\r\n function exportClients(){\r\n $rootScope.loading = true;\r\n AdminService.exportClientsByAdmin().then(function (res, status, headers, config) {\r\n $rootScope.loading = false;\r\n saveData(res, \"ReportClients.xlsx\");\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function exportCandidates(){\r\n $rootScope.loading = true;\r\n AdminService.exportCandidatesByAdmin().then(function (res, status, headers, config) {\r\n $rootScope.loading = false;\r\n saveData(res, \"ReportCandidates.xlsx\");\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n\r\n\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n function saveData(data, fileName) {\r\n var blob = new Blob([data.data], {type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"});\r\n FileSaver.saveAs(blob, fileName);\r\n };\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.admin')\r\n .controller('EmailSenderController', EmailSenderController);\r\n\r\n /** @ngInject */\r\n function EmailSenderController(AdminService, $rootScope, Upload, ngToast, $scope, CONFIG, $state, $timeout,dataList) {\r\n\r\n var vm = this;\r\n vm.propertyName = 'senderName';\r\n vm.propertyNameExtend = 'senderName';\r\n vm.reverse = false;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.sortBy = sortBy;\r\n vm.candidatePageNo = 1;\r\n vm.candidatePageSize = 100;\r\n vm.clientPageNo = 1;\r\n vm.clientPageSize = 100;\r\n vm.emailSender = {};\r\n vm.copyOfEmailTemplate = null;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.selectFileLast = selectFileLast;\r\n vm.removeTemplateFiles = removeTemplateFiles;\r\n vm.onCreateEmailSender = onCreateEmailSender;\r\n vm.openModalEditSender = openModalEditSender;\r\n vm.openModalTestEmailSender = openModalTestEmailSender;\r\n vm.getTypeOfWork = getTypeOfWork;\r\n //vm.emailSender.distance = CONFIG.distance;\r\n vm.openModalDeleteSender = openModalDeleteSender;\r\n active();\r\n function active() {\r\n $rootScope.loading = true;\r\n loadSendToVariables();\r\n loadSendFromVariables();\r\n loadSendFirstVariables();\r\n loadSendFrequencyVariables();\r\n loadEmailSenders();\r\n getTypeOfWork();\r\n }\r\n\r\n function loadSendToVariables() {\r\n AdminService.getSendToVariables().then(function (data) {\r\n vm.sendToVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFromVariables() {\r\n AdminService.getSendFromVariables().then(function (data) {\r\n vm.sendFromVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFirstVariables() {\r\n AdminService.getSendFirstVariables().then(function (data) {\r\n vm.sendFirstVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadSendFrequencyVariables() {\r\n AdminService.getSendFrequencyVariables().then(function (data) {\r\n vm.sendFrequencyVariables = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error);\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function loadEmailSenders() {\r\n $rootScope.loading = true;\r\n AdminService.getEmailSenders().then(function (data) {\r\n vm.emailSenders = data.data.result.items;\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n console.log(error)\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function selectFileLast($files) {\r\n if ($files.length > 0) {\r\n var fileSrc = URL.createObjectURL($files[0]);\r\n if (fileSrc && fileSrc !== '') {\r\n vm.isHasTemplate = true;\r\n vm.fileTemplateUrl = fileSrc;\r\n $timeout(function () {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function onCreateEmailSender() {\r\n if (vm.copyOfEmailTemplate) {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=Templates\",\r\n data: {\r\n file: vm.copyOfEmailTemplate\r\n }\r\n }).then(function (response) {\r\n vm.emailSender.emailTemplateUrl = response.data[0].url;\r\n AdminService.createSettingSenderSchedule(vm.emailSender).then(function (data) {\r\n loadEmailSenders();\r\n vm.emailSender = {};\r\n vm.registerEmailSenderForm.$setUntouched();\r\n vm.registerEmailSenderForm.$setPristine();\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n }\r\n\r\n function removeTemplateFiles() {\r\n if (vm.sender.emailTemplateUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeTemplateFiles(vm.sender.emailTemplateUrl).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.sender.emailTemplateUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.fileTemplateUrl) {\r\n vm.fileTemplateUrl = null;\r\n }\r\n if (vm.isHasTemplate) {\r\n vm.isHasTemplate = false\r\n }\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function openModalEditSender(sender) {\r\n var v = JSON.parse(angular.toJson(sender));\r\n AdminService.showEditSenderModal(v).then(function (res) {\r\n loadEmailSenders();\r\n });\r\n }\r\n function openModalTestEmailSender(sender) {\r\n var v = JSON.parse(angular.toJson(sender));\r\n AdminService.showTestSenderModal(v).then(function (res) {\r\n });\r\n }\r\n function getTypeOfWork() {\r\n dataList.getWorkTypes().then(function (data) {\r\n vm.typeOfWorks = data.data.result.items;\r\n })\r\n }\r\n\r\n function openModalDeleteSender(sender) {\r\n AdminService.showDeleteSenderModal(sender).then(function (isDeleted) {\r\n if (isDeleted) {\r\n vm.emailSenders = vm.emailSenders.filter(function (data) {\r\n return data.id !== sender.id;\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('lx.admin')\r\n .controller('EditLandingPageController', EditLandingPageController);\r\n\r\n /** @ngInject */\r\n function EditLandingPageController(AdminService, $rootScope, Upload, ngToast, $scope, CONFIG, $state, $uibModal, $timeout) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.landingPage = {};\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n vm.copyImage = null;\r\n vm.toolbarOptions = [\r\n ['p', 'pre', 'quote'],\r\n ['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],\r\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\r\n ['html', 'insertLink']];\r\n vm.backToLandingPage = backToLandingPage;\r\n vm.onCreateOrUpdateLandingPage = onCreateOrUpdateLandingPage;\r\n vm.openModalEditLandingPage = openModalEditLandingPage;\r\n vm.selectImage = selectImage;\r\n vm.removeFiles = removeFiles;\r\n active();\r\n function active() {\r\n getLandingPage($state.params.id)\r\n }\r\n\r\n function getLandingPage(id) {\r\n $rootScope.loading = true;\r\n AdminService.getLandingPageById(id).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function onCreateOrUpdateLandingPage() {\r\n var resultCompare = angular.equals(vm.landingPage, vm.landingPageTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n function backToLandingPage() {\r\n $state.go(CONFIG.routes.admin.manageLandingPage);\r\n }\r\n\r\n function openModalEditLandingPage(landingPage) {\r\n var v = JSON.parse(angular.toJson(landingPage));\r\n AdminService.showEditLandingPageModal(v).then(function (res) {\r\n vm.landingPage = res.landingPage;\r\n });\r\n }\r\n\r\n function selectImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n vm.isHasImage = true;\r\n vm.fileUrl = imgSrc;\r\n console.log(\"selectImage\");\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=LandingPages\",\r\n data: {\r\n file: $files\r\n }\r\n }).then(function (response) {\r\n vm.landingPage.imageUrl = response.data[0].url;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n $timeout(function() {\r\n $files = [];\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.landingPage.imageUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeLandingPageImage(vm.landingPage.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.landingPage.imageUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.isHasImage) {\r\n vm.isHasImage = false;\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('lx.admin')\r\n .controller('EditJobController', EditJobController);\r\n\r\n /** @ngInject */\r\n function EditJobController(JobService, AdminService, $rootScope, Upload, ngToast, $scope, CONFIG, $state, $uibModal, $timeout) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.baseUrl = document.querySelector('base').href + 'jobs/';\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.checkValidThrough = false;\r\n vm.checkValidThroughOverLimit = false;\r\n vm.dateOptions = {\r\n minDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1)\r\n };\r\n vm.job = {};\r\n vm.jobTemp = angular.copy(vm.job);\r\n vm.copyImage = null;\r\n vm.toolbarOptions = [\r\n ['p', 'pre', 'quote'],\r\n ['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],\r\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\r\n ['html', 'insertLink']];\r\n vm.backToJobManagement = backToJobManagement;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.resetCheckValidThrough=resetCheckValidThrough;\r\n vm.checkValidThroughDate = checkValidThroughDate;\r\n vm.editJob = editJob;\r\n vm.checkUrlExists = checkUrlExists;\r\n vm.resetErrorUrlExists = resetErrorUrlExists;\r\n vm.generateUrl = generateUrl;\r\n\r\n active();\r\n\r\n function active() {\r\n getJob($state.params.id)\r\n }\r\n\r\n function getJob(id) {\r\n $rootScope.loading = true;\r\n JobService.getJobById(id).then(function (res) {\r\n vm.job = res.data.result;\r\n if (vm.job) {\r\n vm.job.validThrough = vm.job.validThrough ? new Date(vm.job.validThrough) : ''\r\n }\r\n vm.jobTemp = angular.copy(vm.job);\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function backToJobManagement() {\r\n $state.go(CONFIG.routes.admin.jobManagement);\r\n }\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n function checkValidThroughDate(validThroughDate) {\r\n vm.checkValidThrough = true;\r\n if (validThroughDate && validThroughDate.getTime() < vm.dateOptions.minDate.getTime()) {\r\n vm.checkValidThroughOverLimit = true;\r\n } else {\r\n vm.checkValidThroughOverLimit = false;\r\n }\r\n\r\n }\r\n function resetCheckValidThrough() {\r\n vm.checkValidThrough = false;\r\n }\r\n\r\n function editJob() {\r\n var resultCompare = angular.equals(vm.job, vm.jobTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n JobService.updateJobByAdmin(vm.job).then(function (res) {\r\n vm.job = res.data.result;\r\n if (vm.job) {\r\n vm.job.validThrough = vm.job.validThrough ? new Date(vm.job.validThrough) : ''\r\n }\r\n vm.jobTemp = angular.copy(vm.job);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n goToJobManagement();\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }else{\r\n goToJobManagement();\r\n }\r\n }\r\n function goToJobManagement() {\r\n $state.go(CONFIG.routes.admin.jobManagement);\r\n }\r\n\r\n function checkUrlExists(form, url) {\r\n if (url === vm.job.url) {\r\n form.url.$setValidity(\"urlExists\", true);\r\n } else {\r\n AdminService.checkJobUrlExists(url).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('urlExists', false);\r\n }, 1000);\r\n })\r\n }\r\n }\r\n\r\n function generateUrl(form, url) {\r\n if (vm.job.title) {\r\n vm.job.url = vm.job.title.replace(/\\s+/g, '-').toLowerCase();\r\n }\r\n\r\n if (vm.job.address && vm.job.address.postCode) {\r\n vm.job.url += '-' + vm.job.address.postCode.replace(/\\s+/g, '-').toLowerCase();\r\n }\r\n\r\n AdminService.checkJobUrlExists(vm.job.url).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('urlExists', false);\r\n }, 1000);\r\n })\r\n }\r\n\r\n function resetErrorUrlExists(form) {\r\n form.$setValidity('urlExists', 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('lx.admin')\r\n .controller('DeleteUserPagesController', DeleteUserPagesController);\r\n\r\n /** @ngInject */\r\n function DeleteUserPagesController(AdminService, $rootScope, CONFIG, $state) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.backToAdminPage = backToAdminPage;\r\n vm.onSearchUser = onSearchUser;\r\n vm.loadMoreUser = loadMoreUser;\r\n vm.openModalDeleteUser = openModalDeleteUser;\r\n vm.reverse = false;\r\n vm.sortBy = sortBy;\r\n vm.listUsers = [];\r\n vm.deleteUserPage = {};\r\n vm.search = {\r\n emailAddress: null,\r\n pageNo: 1,\r\n pageSize: 10\r\n };\r\n vm.filter = {\r\n emailAddress: null,\r\n pageNo: 1,\r\n pageSize: 10\r\n };\r\n //active();\r\n function active() {\r\n loadUsersList();\r\n }\r\n\r\n function loadUsersList() {\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersByAdmin(vm.filter).then(function (data) {\r\n vm.listUsers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length == 0) {\r\n vm.listUsersResponse = 'No user';\r\n } else if (vm.listUsers.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n\r\n function loadMoreUser() {\r\n if (vm.loadMoreUserCount) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersByAdmin(vm.filter).then(function (data) {\r\n vm.listUsers = vm.listUsers.concat(data.data.result.items);\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length >= vm.totalUserCount) {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n }\r\n\r\n function backToAdminPage() {\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function onSearchUser() {\r\n vm.filter.pageNo = 1;\r\n $rootScope.loading = true;\r\n AdminService.getAllUsersByAdmin(vm.search).then(function (data) {\r\n vm.listUsers = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listUsers.length == 0) {\r\n vm.listUsersResponse = 'No user';\r\n } else {\r\n vm.listUsersResponse = '';\r\n }\r\n if (vm.listUsers.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n } else {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.listUsersResponse = 'No user';\r\n })\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n };\r\n\r\n function openModalDeleteUser(user) {\r\n AdminService.showDeleteUserModal(user).then(function (isDeleted) {\r\n if (isDeleted) {\r\n vm.listUsers = vm.listUsers.filter(function (data) { \r\n return data.id !== user.id;\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('lx.admin')\r\n .controller('CreateLandingPageController', CreateLandingPageController);\r\n\r\n /** @ngInject */\r\n function CreateLandingPageController(AdminService, $rootScope, Upload, ngToast, $timeout, CONFIG, $state, $uibModal) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.landingPage = {};\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n vm.copyImage = null;\r\n vm.toolbarOptions = [\r\n ['p', 'pre', 'quote'],\r\n ['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],\r\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\r\n ['html', 'insertLink']];\r\n vm.backToLandingPage = backToLandingPage;\r\n vm.onCreateOrUpdateLandingPage = onCreateOrUpdateLandingPage;\r\n vm.openModalEditLandingPage = openModalEditLandingPage;\r\n vm.selectImage = selectImage;\r\n vm.removeFiles = removeFiles;\r\n active();\r\n function active() {\r\n }\r\n\r\n function onCreateOrUpdateLandingPage() {\r\n var resultCompare = angular.equals(vm.landingPage, vm.landingPageTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n function backToLandingPage() {\r\n $state.go(CONFIG.routes.admin.manageLandingPage);\r\n }\r\n\r\n function openModalEditLandingPage(landingPage) {\r\n var v = JSON.parse(angular.toJson(landingPage));\r\n AdminService.showEditLandingPageModal(v).then(function (res) {\r\n vm.landingPage = res.landingPage;\r\n });\r\n }\r\n\r\n function selectImage($files) {\r\n if ($files.length > 0) {\r\n var imgSrc = URL.createObjectURL($files[0]);\r\n if (imgSrc && imgSrc !== '') {\r\n $rootScope.loading = true;\r\n Upload.upload({\r\n url: CONFIG.rest.baseURI + CONFIG.rest.uploadFile + \"?subFolder=LandingPages\",\r\n data: {\r\n file: $files\r\n }\r\n }).then(function (response) {\r\n vm.landingPage.imageUrl = response.data[0].url;\r\n AdminService.createOrUpdateLandingPage(vm.landingPage).then(function (res) {\r\n vm.landingPage = res.data.result;\r\n vm.landingPageTemp = angular.copy(vm.landingPage);\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }, function (response) {\r\n $rootScope.loading = false;\r\n if (response.status > 0) {\r\n vm.errorMsg = response.status + ': ' + response.data;\r\n }\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n });\r\n $timeout(function () {\r\n vm.isHasImage = true;\r\n vm.fileUrl = imgSrc;\r\n $files=[]\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n function removeFiles() {\r\n if (vm.landingPage.imageUrl) {\r\n $rootScope.loading = true;\r\n AdminService.removeLandingPageImage(vm.landingPage.id).then(function (data) {\r\n $rootScope.loading = false;\r\n vm.landingPage.imageUrl = null;\r\n ngToast.success({\r\n content: '

Remove successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Remove unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n if (vm.fileUrl) {\r\n vm.fileUrl = null;\r\n }\r\n if (vm.isHasImage) {\r\n vm.isHasImage = false\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('lx.admin')\r\n .controller('CreateJobController', CreateJobController);\r\n\r\n /** @ngInject */\r\n function CreateJobController(JobService, $rootScope, Upload, ngToast, $timeout, CONFIG, $state, $uibModal, AdminService) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.baseUrl = document.querySelector('base').href + 'jobs/';\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n vm.calendarPopup = {\r\n opened: false\r\n };\r\n vm.checkValidThrough = false;\r\n vm.checkValidThroughOverLimit = false;\r\n vm.dateOptions = {\r\n minDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1)\r\n };\r\n vm.job = {};\r\n vm.jobTemp = angular.copy(vm.job);\r\n vm.toolbarOptions = [\r\n ['p', 'pre', 'quote'],\r\n ['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],\r\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\r\n ['html', 'insertLink']];\r\n vm.backToJobManagement = backToJobManagement;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.resetCheckValidThrough=resetCheckValidThrough;\r\n vm.checkValidThroughDate = checkValidThroughDate;\r\n vm.createJob = createJob;\r\n vm.checkUrlExists = checkUrlExists;\r\n vm.resetErrorUrlExists = resetErrorUrlExists;\r\n vm.generateUrl = generateUrl;\r\n\r\n active();\r\n\r\n function active() {\r\n getDefaultUrl();\r\n }\r\n\r\n function backToJobManagement() {\r\n $state.go(CONFIG.routes.admin.jobManagement);\r\n }\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.opened = true;\r\n }\r\n\r\n function checkValidThroughDate(validThrough) {\r\n vm.checkValidThrough = true;\r\n if (validThrough && validThrough.getTime() < vm.dateOptions.minDate.getTime()) {\r\n vm.checkValidThroughOverLimit = true;\r\n } else {\r\n vm.checkValidThroughOverLimit = false;\r\n }\r\n\r\n }\r\n function resetCheckValidThrough() {\r\n vm.checkValidThrough = false;\r\n }\r\n\r\n function createJob() {\r\n var resultCompare = angular.equals(vm.job, vm.jobTemp);\r\n if (!resultCompare) {\r\n $rootScope.loading = true;\r\n JobService.createJobByAdmin(vm.job).then(function (res) {\r\n vm.job = res.data.result;\r\n vm.jobTemp = angular.copy(vm.job);\r\n if (vm.job) {\r\n vm.job.validThrough = vm.job.validThrough ? new Date(vm.job.validThrough) : ''\r\n }\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n goToJobManagement();\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n }\r\n\r\n function goToJobManagement() {\r\n $state.go(CONFIG.routes.admin.jobManagement);\r\n }\r\n\r\n function getDefaultUrl() {\r\n if (vm.job && (vm.job.url == null || vm.job.url == '')) {\r\n AdminService.getJobDefaultUrl().then(function (res) {\r\n vm.job.url = res.data.result;\r\n });\r\n }\r\n }\r\n\r\n function checkUrlExists(form, url) {\r\n if (url === vm.job.url) {\r\n form.url.$setValidity(\"urlExists\", true);\r\n } else {\r\n AdminService.checkJobUrlExists(url).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('urlExists', false);\r\n }, 1000);\r\n })\r\n }\r\n }\r\n\r\n function generateUrl(form, url) {\r\n if (vm.job.title) {\r\n vm.job.url = vm.job.title.toLowerCase().replace(' ', '-');\r\n }\r\n\r\n if (vm.job.address && vm.job.address.postCode) {\r\n vm.job.url += '-' + vm.job.address.postCode.toLowerCase().replace(' ', '-');\r\n }\r\n\r\n AdminService.checkJobUrlExists(vm.job.url).then(function (res) {\r\n if (res.data.result) {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", false);\r\n }, 1000);\r\n } else {\r\n $timeout(function () {\r\n form.url.$setValidity(\"urlExists\", true);\r\n }, 1000);\r\n }\r\n }, function (error) {\r\n $timeout(function () {\r\n form.$setValidity('urlExists', false);\r\n }, 1000);\r\n })\r\n }\r\n\r\n function resetErrorUrlExists(form) {\r\n form.$setValidity('urlExists', 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('lx.admin')\r\n .controller('AdminController', AdminController);\r\n\r\n /** @ngInject */\r\n function AdminController(AdminService, $rootScope, $filter, CONFIG, $state, $element, ngToast) {\r\n var vm = this;\r\n vm.propertyName = 'creationTime';\r\n vm.propertyNameExtend = 'creationTime';\r\n vm.reverse = false;\r\n vm.sortBy = sortBy;\r\n vm.candidateFilter = candidateFilter;\r\n vm.onSearchUser = onSearchUser;\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = false;\r\n vm.search = {\r\n emailAddress: null,\r\n pageNo: 1,\r\n pageSize: 10\r\n };\r\n vm.filter = {\r\n emailAddress: null,\r\n photo: {\r\n isExist: false,\r\n isNotExist: false\r\n },\r\n passport: {\r\n isExist: false,\r\n isNotExist: false\r\n },\r\n document: {\r\n isExist: false,\r\n isNotExist: false\r\n },\r\n insurance: {\r\n isExist: false,\r\n isNotExist: false\r\n },\r\n status: {\r\n isPending: false,\r\n isIllegal: false,\r\n isLegal: false,\r\n isIncorrectIDFile:false\r\n },\r\n emailConfirmedStatus: {\r\n isConfirmed: false,\r\n isNotConfirmed: false\r\n },\r\n pageNo: 1,\r\n pageSize: 20\r\n };\r\n var date = new Date();\r\n vm.zego = {\r\n timeStamp: date\r\n };\r\n vm.dateFormat = CONFIG.bootstrapDateFormat;\r\n\r\n vm.calendarPopup = {\r\n dateOpened: false\r\n };\r\n vm.dateOptions = {\r\n formatYear: 'yyyy',\r\n startingDay: 1,\r\n minDate: date\r\n };\r\n vm.timePickerOptions = {\r\n timeFormat: 'H:i'\r\n };\r\n vm.listPassport = [];\r\n vm.listPassportOrigin = [];\r\n vm.userStatus = userStatus;\r\n vm.loadMoreUser = loadMoreUser;\r\n vm.viewPassport = viewPassport;\r\n vm.viewDocument = viewDocument;\r\n vm.viewPhotoOrVideo = viewPhotoOrVideo;\r\n vm.viewInsuranceCode = viewInsuranceCode;\r\n vm.changeStatus = changeStatus;\r\n vm.listUserStatus = CONFIG.userStatus;\r\n vm.goToExportPage = goToExportPage;\r\n vm.goToRegisterVoucherPage = goToRegisterVoucherPage;\r\n vm.goToSMSSenderPage = goToSMSSenderPage;\r\n vm.goToEmailSenderPage = goToEmailSenderPage;\r\n vm.goToManageBookingPage = goToManageBookingPage;\r\n vm.goToManageLandingPage = goToManageLandingPage;\r\n vm.goToDeleteUserPage = goToDeleteUserPage;\r\n vm.goToStopReceivingEmailPage = goToStopReceivingEmailPage;\r\n vm.goToJobManagementPage = goToJobManagementPage;\r\n vm.onGetZegoUserStatus = onGetZegoUserStatus;\r\n vm.onLoginZego = onLoginZego;\r\n vm.onLogoutZego = onLogoutZego;\r\n vm.openCalendarPopup = openCalendarPopup;\r\n vm.openTimePicker = openTimePicker;\r\n vm.mergeUnique = mergeUnique;\r\n vm.resendEmail = resendEmail;\r\n vm.resendSMS = resendSMS;\r\n vm.verifyEmail = verifyEmail;\r\n vm.active = active;\r\n //active();\r\n\r\n function active() {\r\n $rootScope.loading = true;\r\n AdminService.getUsersByAdmin(vm.filter).then(function (data) {\r\n vm.listPassport = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listPassport.length == 0) {\r\n vm.listPassportResponse = 'No user';\r\n } else if (vm.listPassport.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listPassportResponse = 'No user';\r\n })\r\n\r\n }\r\n\r\n function loadMoreUser() {\r\n if (vm.loadMoreUserCount) {\r\n vm.filter.pageNo++;\r\n $rootScope.loading = true;\r\n AdminService.getUsersByAdmin(vm.filter).then(function (data) {\r\n vm.listPassport = vm.listPassport.concat(data.data.result.items);\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listPassport.length >= vm.totalUserCount) {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listPassportResponse = 'No user';\r\n })\r\n }\r\n\r\n }\r\n\r\n function onSearchUser() {\r\n vm.filter.pageNo = 1;\r\n $rootScope.loading = true;\r\n AdminService.getUsersByAdmin(vm.search).then(function (data) {\r\n vm.listPassport = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listPassport.length == 0) {\r\n vm.listPassportResponse = 'No user';\r\n } else {\r\n vm.listPassportResponse = '';\r\n }\r\n if (vm.listPassport.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n } else {\r\n vm.loadMoreUserCount = false;\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listPassportResponse = 'No user';\r\n })\r\n\r\n }\r\n\r\n function sortBy(propertyName) {\r\n vm.reverse = (vm.propertyName === propertyName) ? !vm.reverse : false;\r\n vm.propertyNameExtend = '';\r\n vm.propertyName = propertyName;\r\n }\r\n\r\n function candidateFilter() {\r\n $rootScope.loading = true;\r\n vm.filter.pageNo = 1;\r\n AdminService.getUsersByAdmin(vm.filter).then(function (data) {\r\n vm.listPassport = data.data.result.items;\r\n vm.totalUserCount = data.data.result.totalCount;\r\n if (vm.listPassport.length == 0) {\r\n vm.listPassportResponse = 'No user';\r\n } else {\r\n vm.listPassportResponse = '';\r\n if (vm.listPassport.length < vm.totalUserCount) {\r\n vm.loadMoreUserCount = true;\r\n } else {\r\n vm.loadMoreUserCount = false;\r\n }\r\n }\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n vm.listPassportResponse = 'No user';\r\n });\r\n }\r\n\r\n function mergeUnique(arr1, arr2) {\r\n return arr1.concat(arr2.filter(function (item) {\r\n return arr1.indexOf(item) === -1;\r\n }));\r\n }\r\n\r\n function userStatus(status) {\r\n var item = $filter('filter')(CONFIG.userStatus, status);\r\n return item[0].status;\r\n }\r\n\r\n function openCalendarPopup() {\r\n vm.calendarPopup.dateOpened = true;\r\n }\r\n\r\n function openTimePicker() {\r\n $element.find(\"#time\").timepicker('show');\r\n }\r\n\r\n function viewPhotoOrVideo(user, $index) {\r\n AdminService.showPhotoOrVideoModal(user).then(function (res) {\r\n vm.listPassport[$index] = res.user;\r\n if (res.user.profile.photoUrl !== null) {\r\n vm.photoFile = res.user.profile.photoUrl;\r\n vm.photoFile = vm.photoFile.split(\".\").pop();\r\n if (vm.photoFile !== \"png\" && vm.photoFile !== \"jpg\" && vm.photoFile !== \"jpeg\" && vm.photoFile !== \"gif\" && vm.photoFile !== \"mp4\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and MP4 files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n function viewPassport(user, $index) {\r\n AdminService.showPassportModal(user).then(function (res) {\r\n vm.listPassport[$index] = res.user;\r\n if (res.user.profile.passportUrl !== null) {\r\n vm.passportFile = res.user.profile.passportUrl;\r\n vm.passportFile = vm.passportFile.split(\".\").pop().toLowerCase();\r\n if (vm.passportFile !== \"png\" && vm.passportFile !== \"jpg\" && vm.passportFile !== \"jpeg\" && vm.passportFile !== \"gif\" && vm.passportFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n\r\n });\r\n }\r\n\r\n function viewDocument(user, $index) {\r\n AdminService.showDocumentModal(user).then(function (res) {\r\n vm.listPassport[$index] = res.user;\r\n if (res.user.profile.documentUrl !== null) {\r\n vm.documentFile = res.user.profile.documentUrl;\r\n vm.documentFile = vm.documentFile.split(\".\").pop().toLowerCase();\r\n if (vm.documentFile !== \"png\" && vm.documentFile !== \"jpg\" && vm.documentFile !== \"jpeg\" && vm.documentFile !== \"gif\" && vm.documentFile !== \"pdf\") {\r\n ngToast.warning({\r\n content: '

Uploaded file is not valid. Only JPG, PNG, JPEG, GIF and PDF files are allowed.

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n function viewInsuranceCode(user, $index) {\r\n AdminService.showInsuranceModal(user).then(function (res) {\r\n vm.listPassport[$index] = res.user;\r\n });\r\n }\r\n\r\n function changeStatus(id, status) {\r\n $rootScope.loading = true;\r\n var dataReq = {\r\n id: id,\r\n profile: {\r\n status: status\r\n }\r\n };\r\n AdminService.updateCandidateUserStatus(dataReq).then(function () {\r\n $rootScope.loading = false;\r\n }, function () {\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function onGetZegoUserStatus() {\r\n $rootScope.loading = true;\r\n AdminService.getZegoUserStatus(vm.zego).then(function (res) {\r\n vm.zego.status = res.data.result.status;\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = true;\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

It responses the status is ' + res.data.result.status + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = false;\r\n var message = error.data.exceptionMessage ? error.data.exceptionMessage : error.data.message;\r\n ngToast.warning({\r\n content: '

It has error is ' + message + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n })\r\n }\r\n\r\n function onLoginZego() {\r\n $rootScope.loading = true;\r\n AdminService.loginZego(vm.zego).then(function (res) {\r\n vm.zego.status = res.data.result.status;\r\n vm.isShowLoginLogOut = true;\r\n vm.isShowStatus = false;\r\n ngToast.success({\r\n content: '

It responses the status is ' + res.data.result.status + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = false;\r\n var message = error.data.exceptionMessage ? error.data.exceptionMessage : error.data.message;\r\n ngToast.warning({\r\n content: '

It has error is ' + message + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function onLogoutZego() {\r\n $rootScope.loading = true;\r\n AdminService.logoutZego(vm.zego).then(function (res) {\r\n vm.zego.status = res.data.result.status;\r\n vm.isShowLoginLogOut = true;\r\n vm.isShowStatus = false;\r\n ngToast.success({\r\n content: '

It responses the status is ' + res.data.result.status + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n }, function (error) {\r\n vm.isShowLoginLogOut = false;\r\n vm.isShowStatus = false;\r\n var message = error.data.exceptionMessage ? error.data.exceptionMessage : error.data.message;\r\n ngToast.warning({\r\n content: '

It has error is ' + message + '

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function resendEmail(candidateId) {\r\n $rootScope.loading = true;\r\n AdminService.sendCandidateConfirmEmail(candidateId).then(function () {\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function resendSMS(candidateId) {\r\n $rootScope.loading = true;\r\n AdminService.sendCandidateConfirmEmailViaPhoneNumber(candidateId).then(function () {\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function verifyEmail(candidate) {\r\n $rootScope.loading = true;\r\n candidate.isEmailConfirmed = true;\r\n AdminService.updateCandidateVerifiedByAdmin(candidate).then(function (res) {\r\n if (res) {\r\n vm.listPassport.forEach(function (item) {\r\n if (item.id === res.data.result.id) {\r\n item = res.data.result;\r\n }\r\n });\r\n }\r\n $rootScope.loading = false;\r\n ngToast.success({\r\n content: '

Submission successful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n }, function () {\r\n ngToast.warning({\r\n content: '

Submission unsuccessful

',\r\n dismissButton: true,\r\n dismissButtonHtml: '×'\r\n });\r\n $rootScope.loading = false;\r\n })\r\n }\r\n\r\n function goToExportPage() {\r\n $state.go(CONFIG.routes.admin.export);\r\n }\r\n\r\n function goToRegisterVoucherPage() {\r\n $state.go(CONFIG.routes.admin.registerVoucher);\r\n }\r\n\r\n function goToSMSSenderPage() {\r\n $state.go(CONFIG.routes.admin.smsSender);\r\n }\r\n\r\n function goToEmailSenderPage() {\r\n $state.go(CONFIG.routes.admin.emailSender);\r\n }\r\n\r\n function goToManageBookingPage() {\r\n $state.go(CONFIG.routes.admin.manageBooking);\r\n }\r\n\r\n function goToManageLandingPage() {\r\n $state.go(CONFIG.routes.admin.manageLandingPage);\r\n }\r\n\r\n function goToDeleteUserPage() {\r\n $state.go(CONFIG.routes.admin.deleteUser);\r\n }\r\n\r\n function goToStopReceivingEmailPage() {\r\n $state.go(CONFIG.routes.admin.stopReceivingEmail);\r\n }\r\n\r\n function goToJobManagementPage() {\r\n $state.go(CONFIG.routes.admin.jobManagement);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .factory('SignupCandidateService', SignupCandidateService);\r\n function SignupCandidateService($http, CONFIG, $rootScope) {\r\n return {\r\n createCandidate: createCandidate,\r\n updateCandidate: updateCandidate,\r\n updateCandidateUserProfile: updateCandidateUserProfile,\r\n createUserBillingInfo: createUserBillingInfo,\r\n updateUserPhoto: updateUserPhoto,\r\n updateUserVideo: updateUserVideo,\r\n updateUserDocument: updateUserDocument,\r\n updateUserContact: updateUserContact,\r\n updateUserPassport: updateUserPassport,\r\n getNearClient: getNearClient,\r\n updateCandidateUserFull: updateCandidateUserFull,\r\n removeUserPhotoAndVideo: removeUserPhotoAndVideo,\r\n removeUserDocument: removeUserDocument,\r\n removeProofOfAddress: removeProofOfAddress,\r\n removeVehicle: removeVehicle,\r\n removeUserPassport: removeUserPassport,\r\n removeDBSCertificate: removeDBSCertificate,\r\n removeInsuranceCode: removeInsuranceCode,\r\n supportForSelfEmployed: supportForSelfEmployed,\r\n updateDeliveryDriver: updateDeliveryDriver\r\n };\r\n function createCandidate(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.create,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateCandidate(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.update,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateCandidateUserProfile(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateCandidateUserProfile,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createUserBillingInfo(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.createUserBillingInfo,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPhoto(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPhoto,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserVideo(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserVideo,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserDocument(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserDocument,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserContact(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserContact,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPassport(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPassport,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getNearClient(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.getNearClient,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateCandidateUserFull(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateCandidateUserFull,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n\r\n function removeUserPhotoAndVideo(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPhotoAndVideo + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserDocument(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserDocument + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n function removeProofOfAddress(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeProofOfAddress + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n function removeVehicle(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeVehicle + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n function removeDBSCertificate(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeDBSCertificate + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n function removeInsuranceCode(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeInsuranceCode + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserPassport(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPassport + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function supportForSelfEmployed(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.supportForSelfEmployed + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateDeliveryDriver(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.updateDeliveryDriver,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.candidate.signup.main, {\r\n url: '/signup',\r\n templateUrl: 'app/candidate/signup/signup.html',\r\n controller: 'SignUpController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate\r\n })\r\n\r\n .state(CONFIG.routes.candidate.signup.step1, {\r\n url: '/step1',\r\n templateUrl: 'app/candidate/signup/partials/step1.html',\r\n controller: 'SignUpStep1Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step2, {\r\n url: '/step2',\r\n templateUrl: 'app/candidate/signup/partials/step2.html',\r\n controller: 'SignUpStep2Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step3, {\r\n url: '/step3',\r\n templateUrl: 'app/candidate/signup/partials/step3.html',\r\n controller: 'SignUpStep3Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step4, {\r\n url: '/step4',\r\n templateUrl: 'app/candidate/signup/partials/step4.html',\r\n controller: 'SignUpStep4Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step5, {\r\n url: '/step5',\r\n templateUrl: 'app/candidate/signup/partials/step5.html',\r\n controller: 'SignUpStep5Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step6, {\r\n url: '/step6',\r\n templateUrl: 'app/candidate/signup/partials/step6.html',\r\n controller: 'SignUpStep6Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step7, {\r\n url: '/step7',\r\n templateUrl: 'app/candidate/signup/partials/step7.html',\r\n controller: 'SignUpStep7Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step8, {\r\n url: '/step8',\r\n templateUrl: 'app/candidate/signup/partials/step8.html',\r\n controller: 'SignUpStep8Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.step9, {\r\n url: '/step9',\r\n templateUrl: 'app/candidate/signup/partials/step9.html',\r\n controller: 'SignUpStep9Controller',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.alternativeDocumentation, {\r\n url: '/alternative-documentation',\r\n templateUrl: 'app/candidate/signup/partials/alternative-documentation.html',\r\n controller: 'DocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.noDocument, {\r\n url: '/no-document',\r\n templateUrl: 'app/candidate/signup/partials/no-document.html',\r\n controller: 'DocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.confirmEmail, {\r\n url: '/confirmEmail/?id&code',\r\n templateUrl: 'app/candidate/signup/partials/confirmEmail.html',\r\n controller: 'SignUpCandidateConfirmEmailController',\r\n controllerAs: 'vm'\r\n })\r\n .state(CONFIG.routes.candidate.signup.modeOfTransport, {\r\n url: '/mode-of-transport',\r\n templateUrl: 'app/candidate/signup/partials/mode-of-transport.html',\r\n controller: 'SignUpModeOfTransportController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.uploadDeliveryDriverDocument, {\r\n url: '/upload-document',\r\n templateUrl: 'app/candidate/signup/partials/upload-document.html',\r\n controller: 'SignUpUploadDeliveryDriverDocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.uploadDBSCertificate, {\r\n url: '/upload-dbs-certificate',\r\n templateUrl: 'app/candidate/signup/partials/upload-dbs-certificate.html',\r\n controller: 'SignUpUploadDBSCertificateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.signup.insuranceCode, {\r\n url: '/insurance-code',\r\n templateUrl: 'app/candidate/signup/partials/insurance-code.html',\r\n controller: 'SignUpInsuranceCodeController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('SignUpController', SignUpController);\r\n\r\n /** @ngInject */\r\n function SignUpController() {\r\n var vm = this;\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .factory('CandidatePortalService', CandidatePortalService);\r\n\r\n /** @ngInject */\r\n function CandidatePortalService($uibModal, CONFIG, $http) {\r\n return {\r\n openReasonModal: openReasonModal,\r\n openFutureBookingModal: openFutureBookingModal,\r\n openBookingHistoryModal: openBookingHistoryModal,\r\n openConfirmCancelModal: openConfirmCancelModal,\r\n openBookingDetail: openBookingDetail,\r\n getListRequestBookings: getListRequestBookings,\r\n acceptRequestBooking: acceptRequestBooking,\r\n refuseRequestBooking: refuseRequestBooking,\r\n refuseRequestBookingWithReason: refuseRequestBookingWithReason,\r\n getCandidateUpcomingBookings: getCandidateUpcomingBookings,\r\n getCandidatePreviousBookings: getCandidatePreviousBookings,\r\n getBooking: getBooking,\r\n updateCandidateUserContact: updateCandidateUserContact,\r\n removeUserPhotoAndVideo: removeUserPhotoAndVideo,\r\n removeUserDocument: removeUserDocument,\r\n removeUserPassport: removeUserPassport,\r\n updateUserPhoto: updateUserPhoto,\r\n updateUserVideo: updateUserVideo,\r\n updateUserDocument: updateUserDocument,\r\n updateUserContact: updateUserContact,\r\n updateUserPassport: updateUserPassport,\r\n getNotifications: getNotifications,\r\n getDayTimeMostSearchByClient: getDayTimeMostSearchByClient,\r\n getValuesMostSearchByClient: getValuesMostSearchByClient,\r\n rateClient: rateClient,\r\n requestDeleteAccount: requestDeleteAccount,\r\n getClientRateByCandidate: getClientRateByCandidate,\r\n getRefusedBooking: getRefusedBooking,\r\n getAcceptedBooking: getAcceptedBooking,\r\n getBookingCandidate: getBookingCandidate,\r\n getCandidateCurrentRating: getCandidateCurrentRating,\r\n getListReasons: getListReasons,\r\n cancelBookingByCandidate: cancelBookingByCandidate,\r\n getClientUserById : getClientUserById,\r\n sendCandidateConfirmEmail : sendCandidateConfirmEmail,\r\n sendCandidateConfirmEmailViaPhoneNumber : sendCandidateConfirmEmailViaPhoneNumber,\r\n receivingEmail: receivingEmail,\r\n openCareQualificationsUploadModal: openCareQualificationsUploadModal,\r\n openUnsuitableForCareModal: openUnsuitableForCareModal\r\n };\r\n function openReasonModal(id) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/reasonRefuse.html',\r\n controller: 'ReasonRefuseCandidateController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n Id: id\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openFutureBookingModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/futureBookings.html',\r\n controller: 'FutureBookingCandidatelController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openBookingHistoryModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/bookingsHistory.html',\r\n controller: 'BookingHistoryCandidatelController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openConfirmCancelModal(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/confirmCancel.html',\r\n controller: 'ConfirmCancelController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openBookingDetail(booking) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/bookingDetail.html',\r\n controller: 'BookingDetailController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n booking: booking\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function getListRequestBookings(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getListRequestBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getListReasons() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getListReasons\r\n };\r\n return $http(req);\r\n }\r\n\r\n function acceptRequestBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.acceptRequestBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function refuseRequestBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.refuseRequestBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n function cancelBookingByCandidate(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.cancelBookingByCandidate + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function refuseRequestBookingWithReason(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.refuseRequestBookingWithReason + \"?id=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getCandidateUpcomingBookings(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getCandidateUpcomingBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getCandidatePreviousBookings(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getCandidatePreviousBookings,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getBooking + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateCandidateUserContact(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateCandidateUserContact,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserPhotoAndVideo(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPhotoAndVideo + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserDocument(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserDocument + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserPassport(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPassport + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPhoto(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPhoto,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserVideo(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserVideo,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserDocument(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserDocument,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserContact(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserContact,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPassport(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPassport,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getNotifications() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.notification.getCandidateNotifications\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getDayTimeMostSearchByClient() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.getDayTimeMostSearchByClient\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getValuesMostSearchByClient() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.getValuesMostSearchByClient\r\n };\r\n return $http(req);\r\n }\r\n\r\n function rateClient(id, data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.rateClient + \"?bookingCandidateId=\" + id,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getClientRateByCandidate(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.getClientRateByCandidate + \"?bookingCandidateId=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getAcceptedBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getAcceptedBooking + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getRefusedBooking(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getRefusedBooking + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getBookingCandidate(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.booking.getBookingCandidate + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getCandidateCurrentRating(userId) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.getCandidateCurrentRating + \"?userId=\" + userId,\r\n };\r\n return $http(req);\r\n }\r\n function getClientUserById(id){\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.getClientUserById + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n function sendCandidateConfirmEmail(id){\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.sendCandidateConfirmEmail + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n function sendCandidateConfirmEmailViaPhoneNumber(id){\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.sendCandidateConfirmEmailViaPhoneNumber + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n function requestDeleteAccount(){\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.requestDeleteAccount,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function receivingEmail(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.receivingEmail,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function openCareQualificationsUploadModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/careQualificationsUpload.html',\r\n controller: 'CareQualificationsUploadCandidatelController',\r\n controllerAs: 'vm',\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function openUnsuitableForCareModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/modal/unsuitableForCare.html',\r\n controller: 'UnsuitableForCareCandidatelController',\r\n controllerAs: 'vm',\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.candidate.portal.main, {\r\n url: '/portal',\r\n templateUrl: 'app/candidate/portal/portal.html',\r\n controller: 'CandidatePortalController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate\r\n })\r\n\r\n .state(CONFIG.routes.candidate.portal.welcomeBack, {\r\n url: '/welcome-back',\r\n templateUrl: 'app/candidate/portal/partials/welcome-back.html',\r\n controller: 'HomePageCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.workfaceProfile, {\r\n url: '/workface-profile',\r\n templateUrl: 'app/candidate/portal/partials/workface-profile.html',\r\n controller: 'WorkfaceProfileController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.availability, {\r\n url: '/availability?type',\r\n templateUrl: 'app/candidate/portal/partials/availability.html',\r\n controller: 'AvailabilityController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.currentStarRating, {\r\n url: '/current-star-rating',\r\n templateUrl: 'app/candidate/portal/partials/current-star-rating.html',\r\n controller: 'CurrentStarRatingController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.profileInformation, {\r\n url: '/amend-your-profile-information?type',\r\n templateUrl: 'app/candidate/portal/partials/profile-information.html',\r\n controller: 'ProfileInformationController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.uploadPhoto, {\r\n url: '/upload-photo-video?type',\r\n templateUrl: 'app/candidate/portal/partials/upload-photo.html',\r\n controller: 'UploadPhotoController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.uploadDocuments, {\r\n url: '/upload-documents',\r\n templateUrl: 'app/candidate/portal/partials/upload-documents.html',\r\n controller: 'UploadPassportDocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.paymentDetails, {\r\n url: '/payment-details',\r\n templateUrl: 'app/candidate/portal/partials/payment-details.html',\r\n controller: 'PaymentDetailsController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.bookingRequests, {\r\n url: '/booking-requests',\r\n templateUrl: 'app/candidate/portal/partials/booking-requests.html',\r\n controller: \"BookingRequestController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.cancelBooking, {\r\n url: '/cancel-booking/:id',\r\n templateUrl: 'app/candidate/portal/partials/cancel-booking.html',\r\n controller: \"CancelBookingController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.howCommunicate, {\r\n url: '/how-communicate',\r\n templateUrl: 'app/candidate/portal/partials/how-communicate.html',\r\n controller: \"CandidateHowCommunicateController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.wheelBooking, {\r\n url: '/wheel-booking/:id',\r\n templateUrl: 'app/candidate/portal/partials/wheel-booking.html',\r\n controller: \"WheelBookingController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.bookingsHistory, {\r\n url: '/bookings-history',\r\n templateUrl: 'app/candidate/portal/partials/bookings-history.html',\r\n controller: \"BookingsHistoryController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.ratingStar, {\r\n url: '/rating-star/:id',\r\n templateUrl: 'app/candidate/portal/partials/rating-star.html',\r\n controller: \"RatingStarCandidateController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.alternativeDocumentation, {\r\n url: '/alternative-documentation',\r\n templateUrl: 'app/candidate/portal/partials/alternative-documentation.html',\r\n controller: 'UploadPassportDocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.noDocument, {\r\n url: '/no-document',\r\n templateUrl: 'app/candidate/portal/partials/no-document.html',\r\n controller: 'UploadPassportDocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.modeOfTransport, {\r\n url: '/mode-of-transport',\r\n templateUrl: 'app/candidate/portal/partials/mode-of-transport.html',\r\n controller: 'ModeOfTransportController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.uploadDeliveryDriverDocument, {\r\n url: '/upload-delivery-driver-document',\r\n templateUrl: 'app/candidate/portal/partials/upload-delivery-driver-document.html',\r\n controller: 'UploadDeliveryDriverDocumentController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.uploadDBSCertificate, {\r\n url: '/upload-dbs-certificate',\r\n templateUrl: 'app/candidate/portal/partials/upload-dbs-certificate.html',\r\n controller: 'UploadDBSCertificateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.insuranceCode, {\r\n url: '/insurance-code',\r\n templateUrl: 'app/candidate/portal/partials/insurance-code.html',\r\n controller: 'InsuranceCodeController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.alreadyToGoAndEarnExtra, {\r\n url: '/already-to-go',\r\n templateUrl: 'app/candidate/portal/partials/already-to-go.html',\r\n controller: 'AlreadyToGoAndEarnExtraController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.employmentSupport, {\r\n url: '/employment-support',\r\n templateUrl: 'app/candidate/portal/partials/employment-support.html',\r\n controller: 'EmploymentSupportController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.employmentSupportNews, {\r\n url: '/employment-support-news',\r\n templateUrl: 'app/candidate/portal/partials/employment-support-news.html',\r\n controller: 'EmploymentSupportNewsController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.yunoQuiz, {\r\n url: '/yuno-quiz',\r\n templateUrl: 'app/candidate/portal/partials/yuno-quiz.html',\r\n controller: 'YunoQuizCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\n .state(CONFIG.routes.candidate.portal.helpUsToHelpYou, {\r\n url: '/help-us-to-help-you',\r\n templateUrl: 'app/candidate/portal/partials/help-us-to-help-you.html',\r\n controller: 'HelpUsToHelpYouCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.suitableForCare, {\r\n url: '/suitable-for-care',\r\n templateUrl: 'app/candidate/portal/partials/suitable-for-care.html',\r\n controller: 'SuitableForCareCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n })\r\n .state(CONFIG.routes.candidate.portal.becomeEligibleForCare, {\r\n url: '/become-eligible-for-care',\r\n templateUrl: 'app/candidate/portal/partials/become-eligible-for-care.html',\r\n controller: 'BecomeEligibleForCareCandidateController',\r\n controllerAs: 'vm',\r\n authorizedRoles: CONFIG.userRoles.candidate,\r\n activeTab: CONFIG.activeTab.candidate\r\n\t\t\t})\r\n\t\t\t.state(CONFIG.routes.candidate.portal.employmentRecord, {\r\n\t\t\t\turl: '/employment-record/:id',\r\n\t\t\t\ttemplateUrl: 'app/candidate/portal/partials/employment-record.html',\r\n\t\t\t\tcontroller: 'EmploymentRecordDocumentController',\r\n\t\t\t\tcontrollerAs: 'vm',\r\n\t\t\t\tauthorizedRoles: CONFIG.userRoles.candidate,\r\n\t\t\t\tactiveTab: CONFIG.activeTab.candidate\r\n\t\t\t})\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.candidate')\r\n .controller('CandidatePortalController', CandidatePortalController);\r\n\r\n /** @ngInject */\r\n function CandidatePortalController($state, $localStorage, $uibModal, CandidatePortalService) {\r\n\r\n var vm = this;\r\n vm.user = angular.copy($localStorage.userProfile);\r\n vm.openPhotoToolTipModal = openPhotoToolTipModal;\r\n vm.openVideoToolTipModal = openVideoToolTipModal;\r\n vm.noDocumentation = noDocumentation;\r\n vm.state = $state;\r\n\r\n function openPhotoToolTipModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/partials/addphoto-tooltip-modal.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n\r\n },\r\n size :'md'\r\n });\r\n }\r\n\r\n function openVideoToolTipModal() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/candidate/portal/partials/addvideo-tooltip-modal.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n\r\n },\r\n size :'md'\r\n });\r\n }\r\n\r\n function noDocumentation() {\r\n $state.go(CONFIG.routes.candidate.portal.noDocument);\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.tempstaff, {\r\n url: '/tempstaff',\r\n templateUrl: 'app/tempstaff/tempstaff.html',\r\n controller: 'TempStaffController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.tempstaff\r\n });\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('TempStaffController', TempStaffController);\r\n\r\n /** @ngInject */\r\n function TempStaffController($state,CONFIG, CommonService, $rootScope) {\r\n\r\n var vm = this;\r\n vm.goLookForWork = goLookForWork;\r\n vm.goLookForStaff = goLookForStaff;\r\n vm.sendContact = sendContact;\r\n function goLookForWork(){\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n function goLookForStaff(){\r\n $state.go(CONFIG.routes.client.signup.home);\r\n }\r\n if($state.params.type === 'contact'){\r\n var newHash = 'contactUs';\r\n console.log($(\"#\"+newHash).offset().top)\r\n $('html,body').animate({scrollTop: $(\"#\"+newHash).offset().top},2000);\r\n return false;\r\n }\r\n function sendContact(){\r\n $rootScope.loading = true;\r\n CommonService.sendContact(vm.contact).then(function(){\r\n $rootScope.loading = false;\r\n vm.contact={};\r\n $('html,body').animate({scrollTop: 0},'slow');\r\n return false;\r\n },function(){\r\n $rootScope.loading = false;\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.resetPassword.sendEmail, {\r\n url: '/sendEmail',\r\n templateUrl: 'app/resetPassword/sendEmail.html',\r\n controller: 'ResetPasswordController',\r\n controllerAs: 'vm'\r\n })\r\n .state(CONFIG.routes.resetPassword.resetPassword, {\r\n url: '/resetPassword/?id&code',\r\n templateUrl: 'app/resetPassword/resetPassword.html',\r\n controller: 'ResetPasswordController',\r\n controllerAs: 'vm'\r\n })\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('ResetPasswordController', ResetPasswordController);\r\n\r\n /** @ngInject */\r\n function ResetPasswordController($state, $stateParams, $rootScope, CommonService, $localStorage, CONFIG) {\r\n\r\n var vm = this;\r\n vm.resetSendEmail = {};\r\n vm.resetConfirmEmail = {};\r\n vm.sendEmail = sendEmail;\r\n vm.resetPassword = resetPassword;\r\n vm.sendEmailResponse = false;\r\n vm.confirmEmailResponse = false;\r\n function sendEmail() {\r\n $rootScope.loading = true;\r\n CommonService.resetPassword(vm.user).then(function (data) {\r\n vm.sendEmailResponse = 'Reset password email is sent. Please check your email address!'\r\n $rootScope.loading = false;\r\n }, function (err) {\r\n $rootScope.loading = false;\r\n vm.sendEmailResponse = err.data.exceptionMessage;\r\n console.log(err);\r\n })\r\n }\r\n\r\n function resetPassword() {\r\n vm.user.code = $stateParams.code;\r\n $rootScope.loading = true;\r\n CommonService.resetPasswordWithToken($stateParams.id, vm.user).then(function (data) {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.login)\r\n }, function (err) {\r\n $rootScope.loading = false;\r\n vm.confirmEmailResponse = err.exceptionMessage;\r\n console.log(err);\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\n\n $stateProvider\r\n .state(CONFIG.routes.login, {\r\n url: '/login',\r\n templateUrl: 'app/login/login.html',\r\n controller: 'LoginController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.login\r\n })\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('LoginController', LoginController);\r\n\r\n /** @ngInject */\r\n function LoginController($state, $rootScope, Auth, $localStorage, CONFIG, CandidatePortalService, ClientPortalService) {\r\n\r\n var vm = this;\r\n vm.loginUser = loginUser;\r\n vm.resetPassword = resetPassword;\r\n vm.login = [];\r\n $rootScope.isHasLogin = false;\r\n $rootScope.isCandidate = false;\r\n $rootScope.isClient = false;\r\n $rootScope.isAdmin = false;\r\n $rootScope.loading = false;\r\n vm.removeErrorText = removeErrorText;\r\n Auth.isAuthenticatedAsync(function (loggedIn) {\r\n if (loggedIn && $localStorage.userProfile && $localStorage.userProfile.isEmailConfirmed) {\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.admin) $state.go(CONFIG.routes.admin.main);\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.candidate) $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.client) $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }\r\n });\r\n function removeErrorText() {\r\n vm.error = null;\r\n }\r\n function loginUser() {\r\n if (vm.login.$valid) {\r\n localStorage.clear();\r\n $rootScope.loading = true;\r\n Auth.login(vm.user).then(function () {\r\n $rootScope.isHasLogin = true;\r\n $rootScope.$broadcast('user:loggedIn');\r\n if (Auth.isAuthorized(CONFIG.userRoles.candidate)) {\r\n candidateLogin();\r\n } else if (Auth.isAuthorized(CONFIG.userRoles.client)) {\r\n clientLogin();\r\n } else if (Auth.isAuthorized(CONFIG.userRoles.admin)) {\r\n adminLogin();\r\n }\r\n }, function (error) {\r\n $rootScope.loading = false;\r\n vm.error = error.exceptionMessage;\r\n })\r\n } else {\r\n $rootScope.loading = false;\r\n }\r\n }\r\n function candidateLogin() {\r\n $rootScope.isCandidate = true;\r\n if ($localStorage.userProfile.isEmailConfirmed) {\r\n if ($localStorage.userProfile.isAcceptedGDPR == true) {\r\n $rootScope.showNewPolicySticky = false;\r\n } else {\r\n $rootScope.showNewPolicySticky = true;\r\n }\r\n CandidatePortalService.getNotifications().then(function (res) {\r\n $rootScope.loading = false;\r\n $rootScope.clientNote = null;\r\n $rootScope.candidateNote = res.data.result.items;\r\n $state.go(CONFIG.routes.candidate.portal.welcomeBack);\r\n }, function () {\r\n $rootScope.loading = false;\r\n });\r\n } else {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n }\r\n function clientLogin() {\r\n $rootScope.isClient = true;\r\n if ($localStorage.userProfile.isEmailConfirmed) {\r\n if ($localStorage.userProfile.isAcceptedGDPR == true) {\r\n $rootScope.showNewPolicySticky = false;\r\n } else {\r\n $rootScope.showNewPolicySticky = true;\r\n }\r\n ClientPortalService.getNotifications().then(function (res) {\r\n $rootScope.loading = false;\r\n $rootScope.candidateNote = null;\r\n $rootScope.clientNote = res.data.result.items;\r\n $state.go(CONFIG.routes.client.portal.welcomeBack);\r\n }, function () {\r\n $rootScope.loading = false;\r\n });\r\n } else {\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.client.signup.home);\r\n }\r\n }\r\n function adminLogin() {\r\n $rootScope.isAdmin = true;\r\n $rootScope.showNewPolicySticky = false;\r\n $rootScope.loading = false;\r\n $state.go(CONFIG.routes.admin.main);\r\n }\r\n\r\n function resetPassword() {\r\n $state.go(CONFIG.routes.resetPassword.sendEmail);\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.jobs.root, {\r\n abstract: true,\r\n url: '/jobs',\r\n template: '
'\r\n })\r\n .state(CONFIG.routes.jobs.main, {\r\n url: '',\r\n templateUrl: 'app/jobs/partials/jobs.html',\r\n controller: 'JobsController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.jobs\r\n })\r\n .state(CONFIG.routes.jobs.job, {\r\n url: '/:url',\r\n templateUrl: 'app/jobs/partials/job.html',\r\n controller: 'JobController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.jobs\r\n });\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .factory('JobService', JobService);\r\n\r\n /** @ngInject */\r\n\r\n function JobService($http, CONFIG) {\r\n return {\r\n createJobByAdmin: createJobByAdmin,\r\n deleteJobByAdmin: deleteJobByAdmin,\r\n getPublishedJobs: getPublishedJobs,\r\n getJobsByAdmin: getJobsByAdmin,\r\n getJobById: getJobById,\r\n getJobByUrl: getJobByUrl,\r\n updateJobByAdmin: updateJobByAdmin\r\n };\r\n\r\n\r\n function createJobByAdmin(job) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.createJobByAdmin;\r\n return $http.post(url, job);\r\n }\r\n\r\n function deleteJobByAdmin(id) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.deleteJobByAdmin + '?id=' + id;\r\n return $http.post(url, {});\r\n }\r\n\r\n function getPublishedJobs() {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.getPublishedJobs;\r\n return $http.post(url, {});\r\n }\r\n\r\n function getJobsByAdmin() {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.getJobsByAdmin;\r\n return $http.post(url, {});\r\n }\r\n\r\n function getJobById(id) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.getJobById + '?id=' + id;\r\n return $http.post(url, {});\r\n }\r\n\r\n function getJobByUrl(url) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.getJobByUrl + '?url=' + url;\r\n return $http.post(url, {});\r\n }\r\n\r\n function updateJobByAdmin(job) {\r\n var url = CONFIG.rest.baseURI + CONFIG.rest.job.updateJobByAdmin;\r\n return $http.post(url, job);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n //$stateProvider\r\n // .state(CONFIG.routes.home, {\r\n // url: '/?type',\r\n // templateUrl: 'app/home/home.html',\r\n // controller: 'HomeController',\r\n // controllerAs: 'vm',\r\n // activeTab: CONFIG.activeTab.home\r\n // });\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('HomeController', HomeController);\r\n\r\n /** @ngInject */\r\n function HomeController($state,CONFIG, CommonService, $rootScope) {\r\n\r\n var vm = this;\r\n vm.goLookForWork = goLookForWork;\r\n vm.goLookForStaff = goLookForStaff;\r\n vm.sendContact = sendContact;\r\n function goLookForWork(){\r\n $state.go(CONFIG.routes.candidate.signup.step1);\r\n }\r\n function goLookForStaff(){\r\n $state.go(CONFIG.routes.client.signup.home);\r\n }\r\n if($state.params.type === 'contact'){\r\n var newHash = 'contactUs';\r\n console.log($(\"#\"+newHash).offset().top)\r\n $('html,body').animate({scrollTop: $(\"#\"+newHash).offset().top},2000);\r\n return false;\r\n }\r\n function sendContact(){\r\n $rootScope.loading = true;\r\n CommonService.sendContact(vm.contact).then(function(){\r\n $rootScope.loading = false;\r\n vm.contact={};\r\n $('html,body').animate({scrollTop: 0},'slow');\r\n return false;\r\n },function(){\r\n $rootScope.loading = false;\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider,CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.costEffectiveTempStaff, {\r\n url: '/cost-effective_temp_staff',\r\n templateUrl: 'app/costEffectiveTempStaff/costEffectiveTempStaff.html',\r\n controller: 'CostEffectiveTempStaffController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.costEffectiveTempStaff\r\n });\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('CostEffectiveTempStaffController', CostEffectiveTempStaffController);\r\n\r\n /** @ngInject */\r\n function CostEffectiveTempStaffController($state,CONFIG, CommonService, $rootScope) {\r\n var vm = this;\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .factory('usersFactory', usersFactory);\r\n\r\n /** @ngInject */\r\n\r\n function usersFactory(CONFIG, $rootScope, $http, $q, $localStorage) {\r\n return {\r\n\t\t\ttoken: 'd0ff589d-adbf-4622-b8d5-6dc911439dc8', //($localStorage.token) ? $localStorage.token : null,\r\n login: login,\r\n getAuth: getAuth,\r\n signOut: signOut,\r\n };\r\n\r\n function login(username, password) {\r\n var self = this;\r\n var deferred = $q.defer();\r\n\r\n $http.post(LabourXchange.Api.v2 + 'Users/Authenticate', '', { headers: { 'Authorization': 'Basic ' + btoa(username + ':' + password) } })\r\n .then(\r\n function (response) {\r\n self.token = response.headers('Token');\r\n\r\n\t\t\t\t\t\t$localStorage.token = self.token;\n\n\t\t\t\t\t\t$rootScope.$broadcast(\"user:logged-in\");\r\n\r\n deferred.resolve(response.data);\r\n\r\n //$http.get(__WEB_SERVICE_BASE_URL + '/Users/Current', { headers: { 'Token': self.token } })\r\n // .then(\r\n // function (response) {\r\n // self.user = response.data;\r\n\r\n // switch (self.user.Role) {\r\n // case Landseer.Enums.Roles.SystemAdmin:\r\n // self.user.isSystemAdmin = true;\r\n // break;\r\n // case Landseer.Enums.Roles.User:\r\n // self.user.isUser = true;\r\n // break;\r\n // }\r\n\r\n // localStorageService.set('user', self.user);\r\n\r\n // deferred.resolve(self.user);\r\n // },\r\n // function (error) {\r\n // console.log(error);\r\n\r\n // deferred.reject(error);\r\n // }\r\n // );\r\n },\r\n function (error) {\r\n console.log(error);\r\n\r\n deferred.reject(error);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getAuth() {\r\n var u = $localStorageuser;\r\n\r\n return btoa(this.user.Username + ':' + this.user.Password);\r\n }\r\n\r\n function signOut() {\r\n var self = this;\r\n\r\n return $http.post(LabourXchange.Api.v2 + 'Users/SignOut', '', { headers: { 'Token': self.token } })\r\n .then(\r\n function (response) {\r\n self.user = null;\r\n delete $localStorage.user;\r\n delete $localStorage.token;\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('lx')\r\n .factory('employmentRecordsFactory', employmentRecordsFactory);\r\n\r\n /** @ngInject */\r\n\r\n function employmentRecordsFactory(CONFIG, $http, $q, $cacheFactory, usersFactory, $localStorage) {\r\n return {\r\n\t\t\tgetEmploymentRecord: getEmploymentRecord,\r\n saveEmploymentRecord: saveEmploymentRecord\r\n };\r\n\n\t\tfunction getEmploymentRecord(identifier) {\n\t\t\treturn $http.get(LabourXchange.Api.v2 + 'EmploymentRecords/' + identifier, { headers: { 'Token': usersFactory.token } })\r\n\t\t\t\t.then(\r\n\t\t\t\t\tfunction (response) {\r\n\t\t\t\t\t\treturn response.data.Result;\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t}\n\r\n function saveEmploymentRecord(employmentRecord) {\r\n var self = this;\r\n var uri = LabourXchange.Api.v2 + 'EmploymentRecords';\r\n\r\n if (!employmentRecord.Identifier) {\r\n return $http.post(uri, employmentRecord)//, { headers: { 'Token': usersFactory.token } })\r\n .then(\r\n function (response) {\r\n return response.data.Result;\r\n }\r\n );\r\n }\r\n else {\r\n return $http.put(uri + '/' + employmentRecord.Identifier, employmentRecord)//, { headers: { 'Token': usersFactory.token } })\r\n .then(\r\n function (response) {\r\n return employmentRecord;\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('lx')\r\n\t\t.factory('documentsFactory', documentsFactory);\r\n\r\n /** @ngInject */\r\n\r\n\tfunction documentsFactory(CONFIG, $http, $q, $cacheFactory) {\r\n return {\r\n uploadDocument: uploadDocument\r\n };\r\n\r\n\t\tfunction uploadDocument(file) {\r\n\t\t\treturn $http.post(LabourXchange.Api.v2 + 'Documents', file, { headers: { 'Content-Type': undefined, 'Filename': file.name }, transformRequest: angular.identity })\r\n .then(\r\n function (response) {\r\n return response.data.Result;\r\n }\r\n );\r\n }\r\n }\r\n\r\n})();\r\n\n(function () {\r\n\t'use strict';\r\n\r\n\tangular\r\n\t\t.module('lx')\r\n\t\t.factory('careCandidatesFactory', careCandidatesFactory);\r\n\r\n\t/** @ngInject */\r\n\r\n\tfunction careCandidatesFactory(CONFIG, $http, $q, $cacheFactory, usersFactory, $localStorage) {\r\n\t\treturn {\r\n\t\t\tgetCurrent: getCurrent,\r\n\t\t\tsearchCareCandidates: searchCareCandidates,\r\n\t\t\tsaveCareCandidate: saveCareCandidate\r\n\t\t};\r\n\r\n\t\tfunction getCurrent(id) {\r\n\t\t\treturn $http.get(LabourXchange.Api.v2 + 'CareCandidates/Current/' + id)\r\n\t\t\t\t.then(\r\n\t\t\t\t\tfunction (response) {\r\n\t\t\t\t\t\t$localStorage.careEmployer = response.data.Result;\r\n\r\n\t\t\t\t\t\treturn response.data.Result;\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\tfunction searchCareCandidates(searchFilters) {\r\n\t\t\treturn $http.post(LabourXchange.Api.v2 + 'CareCandidates/Search', searchFilters)\r\n\t\t\t\t.then(\r\n\t\t\t\t\tfunction (response) {\r\n\t\t\t\t\t\treturn response.data.Result;\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\tfunction saveCareCandidate(careCandidate) {\r\n\t\t\tvar self = this;\r\n\t\t\tvar uri = LabourXchange.Api.v2 + 'CareCandidates';\r\n\t\t\tvar c = angular.copy(careCandidate);\r\n\r\n\t\t\tif (c.EmploymentRecords) delete c.EmploymentRecords;\r\n\r\n\t\t\tif (!c.Identifier) {\r\n\t\t\t\treturn $http.post(uri, c)//, { headers: { 'Token': usersFactory.token } })\r\n\t\t\t\t\t.then(\r\n\t\t\t\t\t\tfunction (response) {\r\n\t\t\t\t\t\t\treturn response.data.Result;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn $http.put(uri + '/' + c.Identifier, c)//, { headers: { 'Token': usersFactory.token } })\r\n\t\t\t\t\t.then(\r\n\t\t\t\t\t\tfunction (response) {\r\n\t\t\t\t\t\t\treturn careCandidate;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider,CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.corporate.main, {\r\n abstract: true,\r\n url: '/corporate',\r\n template: '
'\r\n })\r\n .state(CONFIG.routes.corporate.facilitiesManagement, {\r\n url: '/facilities-management',\r\n templateUrl: 'app/corporate/facilities-management/facilities-management.html',\r\n controller:'CorporateController',\r\n controllerAs : 'vm',\r\n activeTab: CONFIG.activeTab.facilitiesManagement\r\n })\r\n .state(CONFIG.routes.corporate.hospitality, {\r\n url: '/hospitality',\r\n templateUrl: 'app/corporate/hospitality/hospitality.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.hospitality\r\n })\r\n .state(CONFIG.routes.corporate.finalMileDelivery, {\r\n url: '/final-mile-delivery',\r\n templateUrl: 'app/corporate/final-mile-delivery/final-mile-delivery.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.finalMileDelivery\r\n })\r\n .state(CONFIG.routes.corporate.warehouse, {\r\n url: '/warehouse',\r\n templateUrl: 'app/corporate/warehouse/warehouse.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.warehouse\r\n })\r\n .state(CONFIG.routes.corporate.manufacturing, {\r\n url: '/manufacturing',\r\n templateUrl: 'app/corporate/manufacturing/manufacturing.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.manufacturing\r\n })\r\n .state(CONFIG.routes.corporate.care, {\r\n url: '/care',\r\n templateUrl: 'app/corporate/care/care.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.care\r\n })\r\n .state(CONFIG.routes.corporate.cantBePigeonholed, {\r\n url: '/cant-be-pigeonholed',\r\n templateUrl: 'app/corporate/cant-be-pigeonholed/cant-be-pigeonholed.html',\r\n controller: 'CorporateController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.cantBePigeonholed\r\n });\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.corporate', []);\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.corporate')\r\n .controller('CorporateController', CorporateController);\r\n\r\n /** @ngInject */\r\n function CorporateController($state, CONFIG, $uibModal) {\r\n var vm = this;\r\n vm.clickDisplayTitleNews = clickDisplayTitleNews;\r\n vm.clickGoForBusinessPage = clickGoForBusinessPage;\r\n vm.clickGoForIndividualsPage = clickGoForIndividualsPage;\r\n vm.openStarRatingContent = openStarRatingContent;\r\n vm.news = [{\r\n title: 'Uber driver win employment rights',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }, {\r\n title: 'Deliveroo drivers jump',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }, {\r\n title: 'Wages down for most people',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }];\r\n\r\n vm.business = [{\r\n title: 'Part 1 - Criterea',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 2 - Selection',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 3 – Blah blah',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }];\r\n vm.displayTitleNews = vm.news[0].title;\r\n\r\n function clickDisplayTitleNews(title) {\r\n vm.displayTitleNews = title;\r\n }\r\n\r\n function clickGoForIndividualsPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'individualsGuide'})\r\n }\r\n\r\n function clickGoForBusinessPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'businessGuide'})\r\n }\r\n\r\n function openStarRatingContent() {\r\n $uibModal.open({\r\n templateUrl: 'app/common/modal/ratingStar.html',\r\n controller: function ($uibModalInstance) {\r\n var vm = this;\r\n vm.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n },\r\n controllerAs: 'vm',\r\n size: 'md'\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider,CONFIG) {\r\n\r\n $stateProvider\r\n .state('sitemap.xml', {url: '/sitemap.xml'})\r\n .state('robots.txt', {url: '/robots.txt'})\r\n .state(CONFIG.routes.common.main, {\r\n abstract: true,\r\n url: '/common',\r\n template: '
'\r\n })\r\n .state(CONFIG.routes.common.termsConditions, {\r\n url: '/termsConditions',\r\n templateUrl: 'app/common/termsConditions/termsConditions.html',\r\n controller :'CommonController',\r\n controllerAs : 'vm',\r\n activeTab: CONFIG.activeTab.termsConditions\r\n })\r\n .state(CONFIG.routes.common.privacyPolicy, {\r\n url: '/privacyPolicy',\r\n templateUrl: 'app/common/privacyPolicy/privacyPolicy.html',\r\n activeTab: CONFIG.activeTab.privacyPolicy\r\n })\r\n .state(CONFIG.routes.common.faq, {\r\n url: '/faq',\r\n templateUrl: 'app/common/faq/faq.html',\r\n activeTab: CONFIG.activeTab.faq\r\n })\r\n .state(CONFIG.routes.common.aboutUs, {\r\n url: '/aboutUs',\r\n templateUrl: 'app/common/aboutUs/aboutUs.html',\r\n activeTab: CONFIG.activeTab.aboutUs\r\n })\r\n .state(CONFIG.routes.common.livingWage, {\r\n url: '/livingWage',\r\n templateUrl: 'app/common/livingWage/livingWage.html',\r\n activeTab: CONFIG.activeTab.livingWage\r\n })\r\n .state(CONFIG.routes.common.howItWorks, {\r\n url: '/howItWorks/:name',\r\n templateUrl: 'app/common/howItWorks/howItWorks.html' ,\r\n controller :'HowItWorksController',\r\n controllerAs : 'vm',\r\n activeTab: CONFIG.activeTab.howItWorks\r\n })\r\n .state(CONFIG.routes.common.news, {\r\n url: '/news',\r\n templateUrl: 'app/common/news/news.html',\r\n controller :'NewsController',\r\n controllerAs : 'vm',\r\n activeTab: CONFIG.activeTab.news\r\n })\r\n .state(CONFIG.routes.common.recruitment, {\r\n url: '/recruitment/:name',\r\n templateUrl: function (state) {\r\n if(!state.name){\r\n return 'app/common/recruitmentGuide/recruitment.html'\r\n }else{\r\n return 'app/common/recruitmentGuide/' + state.name + '.html'\r\n }\r\n } ,\r\n controller :'RecruitmentController',\r\n controllerAs : 'vm',\r\n activeTab: CONFIG.activeTab.recruitment\r\n });\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx.common')\r\n .controller('CommonController', CommonController);\r\n\r\n /** @ngInject */\r\n function CommonController($state, CONFIG, $uibModal) {\r\n var vm = this;\r\n vm.clickDisplayTitleNews = clickDisplayTitleNews;\r\n vm.clickGoForBusinessPage = clickGoForBusinessPage;\r\n vm.clickGoForIndividualsPage = clickGoForIndividualsPage;\r\n vm.openStarRatingContent = openStarRatingContent;\r\n vm.news = [{\r\n title: 'Uber driver win employment rights',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }, {\r\n title: 'Deliveroo drivers jump',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }, {\r\n title: 'Wages down for most people',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n date: new Date()\r\n }];\r\n\r\n vm.business = [{\r\n title: 'Part 1 - Criterea',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 2 - Selection',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }, {\r\n title: 'Part 3 – Blah blah',\r\n content: 'Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.',\r\n thumbnail: '/assets/images/logo.png'\r\n }];\r\n vm.displayTitleNews = vm.news[0].title;\r\n\r\n function clickDisplayTitleNews(title) {\r\n vm.displayTitleNews = title;\r\n }\r\n\r\n function clickGoForIndividualsPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'individualsGuide'})\r\n }\r\n\r\n function clickGoForBusinessPage() {\r\n $state.go(CONFIG.routes.common.recruitment, {name: 'businessGuide'})\r\n }\r\n\r\n function openStarRatingContent() {\r\n $uibModal.open({\r\n templateUrl: 'app/common/modal/ratingStar.html',\r\n controller: function ($uibModalInstance) {\r\n var vm = this;\r\n vm.close = function () {\r\n $uibModalInstance.close();\r\n }\r\n },\r\n controllerAs: 'vm',\r\n size: 'md'\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('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider,CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.client.root, {\r\n abstract: true,\r\n url: '/client',\r\n template: '
'\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('lx.admin')\r\n .factory('AdminService', AdminService);\r\n\r\n function AdminService($http, CONFIG, $rootScope, $uibModal) {\r\n return {\r\n checkIsExistedVoucher: checkIsExistedVoucher,\r\n checkLandingPageUrlExists: checkLandingPageUrlExists,\r\n createVoucherByAdmin: createVoucherByAdmin,\r\n createSettingSenderSchedule: createSettingSenderSchedule,\r\n createOrUpdateLandingPage: createOrUpdateLandingPage,\r\n createLandingPage: createLandingPage,\r\n deleteLandingPage: deleteLandingPage,\r\n deleteUser: deleteUser,\r\n deleteSender: deleteSender,\r\n exportBookingsByAdmin: exportBookingsByAdmin,\r\n exportCandidatesByAdmin: exportCandidatesByAdmin,\r\n exportClientsByAdmin: exportClientsByAdmin,\r\n editLandingPage: editLandingPage,\r\n getUsersByAdmin: getUsersByAdmin,\r\n getAllUsersByAdmin: getAllUsersByAdmin,\r\n getAllUsersWantToStopReceivingEmail: getAllUsersWantToStopReceivingEmail,\r\n getCandidatesByAdmin: getCandidatesByAdmin,\r\n getClientsByAdmin: getClientsByAdmin,\r\n getSendFirstVariables: getSendFirstVariables,\r\n getSendToVariables: getSendToVariables,\r\n getSendFromVariables: getSendFromVariables,\r\n getSendFrequencyVariables: getSendFrequencyVariables,\r\n getEmailSenders: getEmailSenders,\r\n getSMSSenders: getSMSSenders,\r\n getZegoUserStatus: getZegoUserStatus,\r\n getBookingsByAdmin: getBookingsByAdmin,\r\n getVouchersByAdmin: getVouchersByAdmin,\r\n getPageTypes: getPageTypes,\r\n getLandingPageDefaultUrl: getLandingPageDefaultUrl,\r\n getLandingPageById: getLandingPageById,\r\n getListPagesByAdmin: getListPagesByAdmin,\r\n receivingEmail: receivingEmail,\r\n loginZego: loginZego,\r\n logoutZego: logoutZego,\r\n removeUserPhotoAndVideo: removeUserPhotoAndVideo,\r\n removeUserDocument: removeUserDocument,\r\n removeUserPassport: removeUserPassport,\r\n removeLandingPageImage: removeLandingPageImage,\r\n sendCandidateConfirmEmail: sendCandidateConfirmEmail,\r\n sendCandidateConfirmEmailViaPhoneNumber: sendCandidateConfirmEmailViaPhoneNumber,\r\n showPhotoOrVideoModal: showPhotoOrVideoModal,\r\n showPassportModal: showPassportModal,\r\n showDeleteUserModal: showDeleteUserModal,\r\n showDeleteJobModal: showDeleteJobModal,\r\n showDeleteSenderModal: showDeleteSenderModal,\r\n showDocumentModal: showDocumentModal,\r\n showEditVoucherModal: showEditVoucherModal,\r\n showEditSenderModal: showEditSenderModal,\r\n showTestSenderModal: showTestSenderModal,\r\n showInsuranceModal: showInsuranceModal,\r\n showEditLandingPageModal: showEditLandingPageModal,\r\n testSenderSchedule: testSenderSchedule,\r\n updateCandidateUserStatus: updateCandidateUserStatus,\r\n updateUserPhoto: updateUserPhoto,\r\n updateUserVideo: updateUserVideo,\r\n updateUserDocument: updateUserDocument,\r\n updateUserPassport: updateUserPassport,\r\n updateSettingSenderSchedule: updateSettingSenderSchedule,\r\n updateVoucherByAdmin: updateVoucherByAdmin,\r\n updateCandidateVerifiedByAdmin: updateCandidateVerifiedByAdmin,\r\n checkJobUrlExists: checkJobUrlExists,\r\n getJobDefaultUrl: getJobDefaultUrl\r\n\r\n };\r\n\r\n function checkIsExistedVoucher(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.checkIsExistedVoucher + \"?code=\" + data,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function checkLandingPageUrlExists(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.checkLandingPageUrlExists,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function checkJobUrlExists(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.checkJobUrlExists,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createSettingSenderSchedule(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.createSettingSenderSchedule,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createVoucherByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.createVoucherByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createOrUpdateLandingPage(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.createOrUpdateLandingPage,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function createLandingPage(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.createLandingPage,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function editLandingPage(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.editLandingPage,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function deleteLandingPage(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.deleteLandingPage + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function deleteUser(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.delUser + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function deleteSender(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.delSender + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function exportBookingsByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.exportBookingsByAdmin,\r\n data: data,\r\n // transformRequest: angular.identity,\r\n // headers: {'Content-Type': undefined},\r\n responseType: 'arraybuffer',\r\n };\r\n return $http(req);\r\n }\r\n\r\n function exportCandidatesByAdmin() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.exportCandidatesByAdmin,\r\n transformRequest: angular.identity,\r\n headers: {'Content-Type': undefined},\r\n responseType: 'arraybuffer'\r\n };\r\n return $http(req);\r\n }\r\n\r\n function exportClientsByAdmin() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.exportClientsByAdmin,\r\n responseType: 'arraybuffer'\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getUsersByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getUsersByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getAllUsersByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getAllUsersByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getAllUsersWantToStopReceivingEmail(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getAllUsersWantToStopReceivingEmail,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n\r\n function getCandidatesByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getCandidatesByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getClientsByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getClientsByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getEmailSenders() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getEmailSenders,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getSMSSenders() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getSMSSenders,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getSendFirstVariables() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getSendFirstVariables,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getSendToVariables() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getSendToVariables,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getSendFromVariables() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getSendFromVariables,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getSendFrequencyVariables() {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getSendFrequencyVariables,\r\n data: {}\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getBookingsByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getBookingsByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getPageTypes(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getPageTypes,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getLandingPageDefaultUrl(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getLandingPageDefaultUrl,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getJobDefaultUrl(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getJobDefaultUrl,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getVouchersByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getVouchersByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getZegoUserStatus(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getZegoUserStatus,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getLandingPageById(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getLandingPageById + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function getListPagesByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.getListPagesByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function receivingEmail(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.receivingEmail,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function loginZego(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.loginZego,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function logoutZego(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.logoutZego,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserPhotoAndVideo(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPhotoAndVideo + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserDocument(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserDocument + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeUserPassport(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.removeUserPassport + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function removeLandingPageImage(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.removeLandingPageImage + \"?id=\" + id\r\n };\r\n return $http(req);\r\n }\r\n\r\n function sendCandidateConfirmEmail(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.sendCandidateConfirmEmail + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function sendCandidateConfirmEmailViaPhoneNumber(id) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.sendCandidateConfirmEmailViaPhoneNumber + \"?id=\" + id,\r\n };\r\n return $http(req);\r\n }\r\n\r\n function showPhotoOrVideoModal(user) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/viewPhotoOrVideo.html',\r\n controller: 'ShowPhotoOrVideoController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n user: user\r\n },\r\n size: 'lg'\r\n });\r\n return modalInstance.result;\r\n }\r\n\r\n function showPassportModal(user) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/viewPassport.html',\r\n controller: 'ShowPassportController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n user: user\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showDocumentModal(user) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/viewDocument.html',\r\n controller: 'ShowDocumentController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n user: user\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showEditVoucherModal(voucher) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/editVoucher.html',\r\n controller: 'EditVoucherController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n voucher: voucher\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showEditSenderModal(sender) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/editSender.html',\r\n controller: 'EditSenderController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n sender: sender\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showDeleteUserModal(user) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/deleteUserModal.html',\r\n controller: 'DeleteUserModal',\r\n controllerAs: 'vm',\r\n resolve: {\r\n user: user\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showDeleteJobModal(job) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/deleteJobModal.html',\r\n controller: 'DeleteJobModalController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n job: job\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showDeleteSenderModal(sender) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/deleteSenderModal.html',\r\n controller: 'DeleteSenderModal',\r\n controllerAs: 'vm',\r\n resolve: {\r\n sender: sender\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showTestSenderModal(sender) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/testSender.html',\r\n controller: 'TestSenderController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n sender: sender\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showInsuranceModal(user) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/viewInsuranceCode.html',\r\n controller: 'ShowInsuranceCodeController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n user: user\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function showEditLandingPageModal(landingPage) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/admin/modal/editLandingPage.html',\r\n controller: 'ShowEditLandingPageController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n landingPage: landingPage\r\n },\r\n size: 'md'\r\n });\r\n\r\n return modalInstance.result;\r\n }\r\n\r\n function testSenderSchedule(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.testSenderSchedule,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n\r\n function updateCandidateUserStatus(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.updateCandidateUserStatus,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateCandidateVerifiedByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.updateCandidateVerifiedByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPhoto(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPhoto,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserVideo(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserVideo,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserDocument(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserDocument,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateUserPassport(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.candidate.signup.updateUserPassport,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateVoucherByAdmin(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.updateVoucherByAdmin,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n\r\n function updateSettingSenderSchedule(data) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.admin.updateSettingSenderSchedule,\r\n data: data\r\n };\r\n return $http(req);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.admin.root, {\r\n abstract: true,\r\n url: '/admin',\r\n template: '
',\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.main, {\r\n url: '',\r\n templateUrl: 'app/admin/partials/admin.html',\r\n controller: 'AdminController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.export, {\r\n url: '/export',\r\n templateUrl: 'app/admin/partials/export-excel.html',\r\n controller: 'ExportController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.registerVoucher, {\r\n url: '/register-voucher',\r\n templateUrl: 'app/admin/partials/register-voucher.html',\r\n controller: 'RegisterVoucherController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.emailSender, {\r\n url: '/email-sender',\r\n templateUrl: 'app/admin/partials/email-sender.html',\r\n controller: 'EmailSenderController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.smsSender, {\r\n url: '/sms-sender',\r\n templateUrl: 'app/admin/partials/sms-sender.html',\r\n controller: 'SMSSenderController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.manageBooking, {\r\n url: '/manage-booking',\r\n templateUrl: 'app/admin/partials/manage-booking.html',\r\n controller: 'ManageBookingController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.manageLandingPage, {\r\n url: '/landing-pages',\r\n templateUrl: 'app/admin/partials/landing-pages.html',\r\n controller: 'LandingPagesController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.deleteUser, {\r\n url: '/delete-user-page',\r\n templateUrl: 'app/admin/partials/delete-user-page.html',\r\n controller: 'DeleteUserPagesController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.stopReceivingEmail, {\r\n url: '/receiving-email-page',\r\n templateUrl: 'app/admin/partials/receiving-email-page.html',\r\n controller: 'ReceivingEmailPageController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.jobManagement, {\r\n url: '/jobs',\r\n templateUrl: 'app/admin/partials/job-management.html',\r\n controller: 'JobManagementController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.createJob, {\r\n url: '/jobs/create',\r\n templateUrl: 'app/admin/partials/create-job.html',\r\n controller: 'CreateJobController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.editJob, {\r\n url: '/jobs/:id',\r\n templateUrl: 'app/admin/partials/edit-job.html',\r\n controller: 'EditJobController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.createLandingPage, {\r\n url: '/landing-pages/create',\r\n templateUrl: 'app/admin/partials/create-landing-page.html',\r\n controller: 'CreateLandingPageController',\r\n controllerAs: 'vm',\r\n activeTab: CONFIG.activeTab.admin,\r\n authorizedRoles: CONFIG.userRoles.admin\r\n })\r\n .state(CONFIG.routes.admin.editLandingPage, {\r\n url: '/landing-pages/:id',\r\n templateUrl: 'app/admin/partials/edit-landing-page.html',\r\n controller: \"EditLandingPageController\",\r\n controllerAs: \"vm\",\r\n authorizedRoles: CONFIG.userRoles.admin,\r\n activeTab: CONFIG.activeTab.admin\r\n })\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider,CONFIG) {\r\n\r\n $stateProvider\r\n .state(CONFIG.routes.candidate.root, {\r\n abstract: true,\r\n url: '/candidate',\r\n template: '
'\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('lx')\r\n .factory('LandingPageService', LandingPageService);\r\n function LandingPageService($http, CONFIG) {\r\n return {\r\n getLandingPageByUrl: getLandingPageByUrl\r\n };\r\n\r\n function getLandingPageByUrl(url) {\r\n var req = {\r\n method: 'POST',\r\n url: CONFIG.rest.baseURI + CONFIG.rest.landingPage.getLandingPageByUrl + \"?url=\" + url\r\n };\r\n return $http(req);\r\n }\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, CONFIG) {\r\n\r\n //$stateProvider\r\n // .state(CONFIG.routes.landingPage, {\r\n // url: '/:url',\r\n // templateUrl: 'app/addLandingPage/landingPage.html',\r\n // controller: 'LandingPageController',\r\n // controllerAs: 'vm',\r\n // activeTab: CONFIG.activeTab.landingPage\r\n // });\r\n\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .controller('LandingPageController', LandingPageController);\r\n\r\n /** @ngInject */\r\n function LandingPageController($state, CONFIG, LandingPageService, $rootScope) {\r\n\r\n var vm = this;\r\n vm.link = CONFIG.rest.baseURILink;\r\n vm.landingPage = {};\r\n vm.errorMessage=null;\r\n active();\r\n\r\n function active() {\r\n $rootScope.loading = true;\r\n LandingPageService.getLandingPageByUrl($state.params.url).then(function (res) {\r\n $rootScope.loading = false;\r\n vm.landingPage = res.data.result;\r\n if(vm.landingPage && vm.landingPage.pageType){\r\n var typeName = vm.landingPage.pageType.name;\r\n if( typeName.includes(CONFIG.pageTypes.news)){\r\n $rootScope.activeTab = CONFIG.activeTab.news;\r\n }else{\r\n if( typeName.includes(CONFIG.pageTypes.recruitmentGuide)){\r\n $rootScope.activeTab = CONFIG.activeTab.recruitment;\r\n }\r\n }\r\n }\r\n }, function (error) {\r\n vm.errorMessage = error.data.exceptionMessage;\r\n $rootScope.loading = false;\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('lx')\r\n .constant('moment', moment)\r\n .run(runBlock);\r\n\r\n /** @ngInject */\r\n function runBlock($rootScope, ngToast, Auth, $state, $localStorage, CONFIG, $timeout) {\r\n Auth.isAuthenticatedAsync(function (loggedIn) {\r\n if (loggedIn) {\r\n Auth.getCurrentUser().$promise.then(function (data) {\r\n $localStorage.userProfile = data.result.user;\r\n $localStorage.searchFilter = data.result.user;\r\n Auth.getLocationFromUserAddress(data.result.user);\r\n checkUserLogin();\r\n });\r\n } else {\r\n delete $localStorage.token;\r\n delete $localStorage.expireInSeconds;\r\n delete $localStorage.userProfile;\r\n delete $localStorage.searchFilter;\r\n localStorage.clear();\r\n checkUserLogin();\r\n }\r\n });\r\n function checkUserLogin() {\r\n if ($localStorage.userProfile && $localStorage.userProfile.isEmailConfirmed) {\r\n $rootScope.isHasLogin = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.admin) return $rootScope.isAdmin = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.candidate) return $rootScope.isCandidate = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.client) return $rootScope.isClient = true;\r\n } else {\r\n $rootScope.isHasLogin = false;\r\n $rootScope.isCandidate = false;\r\n $rootScope.isClient = false;\r\n $rootScope.isAdmin = false;\r\n }\r\n }\r\n\r\n checkUserLogin();\r\n $rootScope.$on(\"$stateChangeStart\", function (event, next, pre, from, to) {\r\n\r\n //validate authenticate & roles\r\n if (next.authorizedRoles) {\r\n Auth.isAuthenticatedAsync(function (loggedIn) {\r\n\r\n if (!loggedIn) {\r\n noLogin()\r\n } else {\r\n checkUserLoginWithoutConfirm();\r\n if (!Auth.isAuthorized(next.authorizedRoles)) {\r\n\r\n event.preventDefault();\r\n $state.go(CONFIG.routes.home);\r\n\r\n }\r\n hasLogin()\r\n }\r\n });\r\n }\r\n function hasLogin() {\r\n var isAcceptedGoToPortal = checkAcceptedGoToPortal(next);\r\n var isAcceptedGoToSignUp = checkAcceptedGoToSignUp(next, from);\r\n var isAcceptedGoToAdmin = checkAcceptedGoToAdmin(next);\r\n if (!isAcceptedGoToPortal &&\r\n !isAcceptedGoToSignUp &&\r\n !isAcceptedGoToAdmin) {\r\n event.preventDefault();\r\n Auth.logout();\r\n $rootScope.showNewPolicySticky = false;\r\n $state.go(CONFIG.routes.login);\r\n }\r\n }\r\n\r\n\r\n function noLogin() {\r\n if (next.name.indexOf(CONFIG.routes.client.portal.main) !== -1\r\n || next.name.indexOf(CONFIG.routes.candidate.portal.main) !== -1\r\n || next.name.indexOf(CONFIG.routes.admin.root) !== -1) {\r\n event.preventDefault();\r\n Auth.logout();\r\n $rootScope.showNewPolicySticky = false;\r\n $state.go(CONFIG.routes.login);\r\n }\r\n }\r\n\r\n var expireInSeconds = new Date(moment($localStorage.expireInSeconds));\r\n\r\n function checkExpireInSeconds() {\r\n if ($localStorage.userProfile && $localStorage.userProfile.isEmailConfirmed && new Date() - expireInSeconds >= 0) {\r\n Auth.logout();\r\n $rootScope.showNewPolicySticky = false;\r\n $state.go(CONFIG.routes.login);\r\n }\r\n }\r\n\r\n function checkUserLoginWithoutConfirm() {\r\n if ($localStorage.userProfile) {\r\n $rootScope.isHasLogin = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.admin) return $rootScope.isAdmin = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.candidate) return $rootScope.isCandidate = true;\r\n if ($localStorage.userProfile.roleName == CONFIG.userRoles.client) return $rootScope.isClient = true;\r\n } else {\r\n $rootScope.isHasLogin = false;\r\n $rootScope.isCandidate = false;\r\n $rootScope.isClient = false;\r\n $rootScope.isAdmin = false;\r\n }\r\n }\r\n\r\n checkExpireInSeconds();\r\n angular.element('body,html').animate({\r\n scrollTop: 0\r\n }, 200);\r\n function checkAcceptedGoToPortal(next) {\r\n if ($localStorage.userProfile &&\r\n (next.name.indexOf(CONFIG.routes.client.portal.main) !== -1 || next.name.indexOf(CONFIG.routes.candidate.portal.main) !== -1)\r\n && $localStorage.userProfile.isEmailConfirmed)\r\n return true;\r\n return false;\r\n\r\n }\r\n\r\n function checkAcceptedGoToAdmin(next) {\r\n if (next.authorizedRoles === CONFIG.userRoles.admin && next.name.indexOf(CONFIG.routes.admin.root) !== -1)\r\n return true;\r\n return false;\r\n\r\n }\r\n\r\n function checkAcceptedGoToSignUp(next, from) {\r\n if (\r\n (\r\n next.name.indexOf(CONFIG.routes.candidate.signup.main) !== -1 ||\r\n (\r\n (\r\n next.name.indexOf(CONFIG.routes.candidate.portal.profileInformation) !== -1 ||\r\n next.name.indexOf(CONFIG.routes.candidate.portal.uploadPhoto) !== -1 ||\r\n next.name.indexOf(CONFIG.routes.candidate.portal.availability !== -1)\r\n ) &&\r\n from.name.indexOf(CONFIG.routes.candidate.signup.main) !== -1\r\n ) ||\r\n next.name.indexOf(CONFIG.routes.client.signup.main) !== -1\r\n ) &&\r\n (\r\n (\r\n from.name.indexOf(CONFIG.routes.candidate.portal.main) == -1 ||\r\n (\r\n (\r\n from.name.indexOf(CONFIG.routes.candidate.portal.profileInformation) !== -1 ||\r\n from.name.indexOf(CONFIG.routes.candidate.portal.uploadPhoto) !== -1 ||\r\n from.name.indexOf(CONFIG.routes.candidate.portal.availability !== -1)\r\n ) && next.name.indexOf(CONFIG.routes.candidate.signup.main) !== -1\r\n )\r\n ) &&\r\n from.name.indexOf(CONFIG.routes.client.portal.main) == -1\r\n ) &&\r\n $localStorage.isSignup\r\n )\r\n return true;\r\n return false;\r\n\r\n }\r\n });\r\n $rootScope.$on(\"$stateChangeSuccess\", function () {\r\n $timeout(function () {\r\n wisepops(\"pageview\");\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('lx')\r\n .constant('_', _)\r\n .constant('CONFIG', {\r\n rest: {\r\n baseURI: window.baseURI,\r\n baseURILink: window.baseURILink,\r\n action: {\r\n signin: \"account/Authenticate\",\r\n signinWithoutConfirm: \"account/AuthenticateWithoutConfirm\"\r\n },\r\n candidate: {\r\n signup: {\r\n create: \"userAccount/CreateCandidateUser\",\r\n update: \"services/app/user/UpdateCandidateUser\",\r\n updateCandidateUserProfile: \"services/app/user/UpdateCandidateUserProfile\",\r\n createUserBillingInfo: \"services/app/user/CreateUserBillingInfo\",\r\n getUserProfile: \"services/app/user/GetUserProfile\",\r\n updateUserPhoto: \"services/app/user/updateUserPhoto\",\r\n updateUserVideo: \"services/app/user/updateUserVideo\",\r\n updateUserDocument: \"services/app/user/updateUserDocument\",\r\n updateUserContact: \"userAccount/updateCandidateProfileContact\",\r\n updateUserPassport: \"services/app/user/updateUserPassport\",\r\n getNearClient: \"services/app/user/getNearClient\",\r\n updateCandidateUserFull: 'services/app/user/UpdateCandidateUserFull',\r\n updateCandidateUserContact: 'services/app/user/UpdateCandidateUserContact',\r\n getDayTimeMostSearchByClient: 'services/app/user/GetDayTimeMostSearchByClient',\r\n getValuesMostSearchByClient: 'services/app/user/GetValuesMostSearchByClient',\r\n sendCandidateConfirmEmail: \"userAccount/SendCandidateConfirmEmail\",\r\n sendCandidateConfirmEmailViaPhoneNumber: \"userAccount/sendCandidateConfirmEmailViaPhoneNumber\",\r\n supportForSelfEmployed: \"services/app/user/SupportForSelfEmployed\"\r\n },\r\n getCandidateCurrentRating: 'services/app/currentRatingStar/GetCandidateCurrentRating',\r\n updateDeliveryDriver: \"services/app/user/UpdateCandidateUserDeliveryDriverAsync\",\r\n receivingEmail: 'services/app/user/UpdateStatusRecevingEmailAsync',\r\n },\r\n client: {\r\n signup: {\r\n create: \"userAccount/CreateClientUser\",\r\n update: \"services/app/user/UpdateClientUser\",\r\n updateClientUserProfile: \"services/app/user/UpdateClientUserProfile\",\r\n findStaffs: \"services/app/user/FindStaffs\",\r\n updateClientUserFull: 'services/app/user/updateClientUserFull',\r\n updateClientUserContact: 'services/app/user/UpdateClientUserContact',\r\n sendClientConfirmEmail: \"userAccount/SendClientConfirmEmail\",\r\n sendClientConfirmEmailViaPhoneNumber: \"userAccount/sendClientConfirmEmailViaPhoneNumber\",\r\n getVoucher: \"services/app/voucher/getVoucher\"\r\n },\r\n receivingEmail: 'services/app/user/UpdateStatusRecevingEmailAsync',\r\n },\r\n admin: {\r\n checkIsExistedVoucher: 'services/app/voucher/CheckIsExistedVoucher',\r\n checkLandingPageUrlExists: 'services/app/landingPage/CheckUrlExists',\r\n createVoucherByAdmin: 'services/app/voucher/CreateVoucherByAdmin',\r\n createSettingSenderSchedule: 'services/app/sender/CreateSettingSenderSchedule',\r\n createOrUpdateLandingPage: 'services/app/landingPage/CreateOrUpdatePageByAdminAsync',\r\n deleteLandingPage: 'services/app/landingPage/DeleteLandingPageAsync',\r\n delUser: 'services/app/user/DeleteUserByAdminAsync',\r\n delSender: 'services/app/sender/DeleteSenderAsync',\r\n exportBookingsByAdmin: 'services/app/booking/ExportBookingsToExcelByAdmin',\r\n exportCandidatesByAdmin: 'services/app/user/ExportCandidatesToExcelByAdmin',\r\n exportClientsByAdmin: 'services/app/user/ExportClientsToExcelByAdmin',\r\n getUsersByAdmin: 'services/app/user/GetUsersByAdmin',\r\n getAllUsersByAdmin: 'services/app/user/GetAllCandidateAndClientUsersByAdmin',\r\n getAllUsersWantToStopReceivingEmail: 'services/app/user/GetAllUsersNeedToUpdateReceivingEmailStatusByAdmin',\r\n getCandidatesByAdmin: 'services/app/user/GetCandidatesByAdmin',\r\n getVouchersByAdmin: 'services/app/voucher/GetVouchersByAdmin',\r\n getClientsByAdmin: 'services/app/user/GetClientsByAdmin',\r\n getSendFirstVariables: 'services/app/sendFirstVariable/GetSendFirstVariables',\r\n getSendToVariables: 'services/app/sendToVariable/GetSendToVariables',\r\n getSendFromVariables: 'services/app/sendFromVariable/GetSendFromVariables',\r\n getEmailSenders: 'services/app/sender/GetEmailSenders',\r\n getSMSSenders: 'services/app/sender/GetSMSSenders',\r\n getBookingsByAdmin: 'services/app/booking/GetBookingsByAdmin',\r\n getZegoUserStatus: 'services/app/user/GetZegoUserStatusAsync',\r\n getSendFrequencyVariables: 'services/app/sendFrequencyVariable/GetSendFrequencyVariables',\r\n getPageTypes: 'services/app/pageType/GetPageTypes',\r\n getLandingPageDefaultUrl: 'services/app/landingPage/GetDefaultUrl',\r\n getLandingPageById: 'services/app/landingPage/GetLandingPageById',\r\n getListPagesByAdmin: 'services/app/landingPage/GetListPagesByAdmin',\r\n loginZego: 'services/app/user/LoginZegoAsync',\r\n logoutZego: 'services/app/user/LogoutZegoAsync',\r\n testSenderSchedule: 'services/app/sender/TestSenderSchedule',\r\n updateCandidateUserStatus: 'services/app/user/UpdateCandidateUserStatus',\r\n receivingEmail: 'services/app/user/UpdateStatusRecevingEmailAsync',\r\n sendCandidateConfirmEmail: \"userAccount/SendCandidateConfirmEmail\",\r\n sendCandidateConfirmEmailViaPhoneNumber: \"userAccount/SendCandidateConfirmEmailViaPhoneNumber\",\r\n updateVoucherByAdmin: 'services/app/voucher/UpdateVoucherByAdmin',\r\n updateSettingSenderSchedule: 'services/app/sender/UpdateSettingSenderSchedule',\r\n removeLandingPageImage: \"services/app/landingPage/RemoveLandingPageImageUrl\",\r\n updateCandidateVerifiedByAdmin: 'services/app/user/UpdateCandidateVerifiedByAdmin',\r\n getJobDefaultUrl: 'services/app/job/GetDefaultUrl',\r\n checkJobUrlExists: 'services/app/job/CheckUrlExists',\r\n },\r\n confirm: \"userAccount/confirm\",\r\n resetPassword: \"userAccount/resetPassword\",\r\n resetPasswordWithToken: \"userAccount/resetPasswordWithToken\",\r\n sendContact: \"services/app/contact/RequestContact\",\r\n booking: {\r\n createBookings: 'services/app/booking/CreateBookings',\r\n getListRequestBookings: 'services/app/booking/GetRequestBooking',\r\n getClientRequestBookings: 'services/app/booking/GetClientRequestBooking',\r\n acceptRequestBooking: 'services/app/booking/AcceptRequestBooking',\r\n refuseRequestBooking: 'services/app/booking/RefuseRequestBooking',\r\n refuseRequestBookingWithReason: 'services/app/booking/RefuseBookingWithReason',\r\n getCandidatePreviousBookings: 'services/app/booking/GetCandidatePreviousBookings',\r\n getClientPreviousBookings: 'services/app/booking/GetClientPreviousBookings',\r\n getCandidateUpcomingBookings: 'services/app/booking/getCandidateUpcomingBookings',\r\n getClientUpcomingBookings: 'services/app/booking/getClientUpcomingBookings',\r\n getBooking: \"services/app/booking/GetBooking\",\r\n reBooking: \"services/app/booking/ReBooking\",\r\n amentBooking: \"services/app/booking/AmentBooking\",\r\n getAcceptedBooking: \"services/app/booking/GetAcceptedBooking\",\r\n paidBooking: \"services/app/booking/PaidBooking\",\r\n getRefusedBooking: 'services/app/booking/GetRefusedBooking',\r\n getBookingCandidate: 'services/app/booking/GetBooking',\r\n cancelBookingByClient: 'services/app/booking/CancelBookingByClient',\r\n cancelBookingByCandidate: 'services/app/booking/CancelBookingByCandidate',\r\n reportOtherIssueBooking: 'services/app/booking/ReportOtherIssueBooking',\r\n getListReasons: 'services/app/refusedReason/GetRefusedReasons',\r\n getCandidateUserById: 'services/app/user/getCandidateUserById',\r\n getClientUserById: 'services/app/user/getClientUserById',\r\n calculatorAmount: 'services/app/booking/getAmountBooking',\r\n closedNotification: 'services/app/booking/ClosedNotification',\r\n closedNotifications: 'services/app/booking/ClosedNotifications',\r\n getVATBooking: 'services/app/booking/GetVATBooking',\r\n redeemVoucherCode: 'services/app/booking/RedeemVoucherCode'\r\n },\r\n permanentRole: 'services/app/permanentRole/RequestPermanentRole',\r\n role: {\r\n getByName: \"services/app/role/GetRoleByName\"\r\n },\r\n getSkills: \"services/app/keySkill/GetKeySkills\",\r\n getEmploymentStatuses: \"services/app/employmentStatus/GetEmploymentStatuses\",\r\n getKeyExperiences: \"services/app/keyExperience/GetKeyExperiences\",\r\n getBusinessTypes: \"services/app/businessType/GetBusinessTypes\",\r\n getWorkTypes: \"services/app/workType/GetWorkTypes\",\r\n getTransportationModes: \"services/app/transportationMode/getTransportationModes\",\r\n uploadFile: \"fileupload/post\",\r\n removeUserPhotoAndVideo: \"services/app/user/RemoveUserPhotoAndVideo\",\r\n removeUserDocument: \"services/app/user/RemoveUserDocument\",\r\n removeUserPassport: \"services/app/user/RemoveUserPassport\",\r\n removeVehicle: \"services/app/user/RemoveVehicle\",\r\n removeProofOfAddress: \"services/app/user/RemoveProofOfAddress\",\r\n removeDBSCertificate: \"services/app/user/RemoveDBSCertificate\",\r\n removeInsuranceCode: \"services/app/user/RemoveInsuranceCode\",\r\n notification: {\r\n getCandidateNotifications: \"services/app/notification/getCandidateNotifications\",\r\n getClientNotifications: \"services/app/notification/GetClientNotifications\"\r\n },\r\n rateClient: \"services/app/rating/RateClient\",\r\n getClientRateByCandidate: \"services/app/rating/GetClientRateByCandidate\",\r\n rateCandidate: \"services/app/rating/RateCandidate\",\r\n getCandidateRateByClient: \"services/app/rating/GetCandidateRateByClient\",\r\n requestDeleteAccount: \"services/app/user/RequestDeleteUserAsync\",\r\n landingPage: {\r\n getLandingPageByUrl: \"services/app/landingPage/GetLandingPageByUrl\",\r\n getListPagesByPageType: \"services/app/landingPage/GetListPagesByPageType\"\r\n },\r\n job: {\r\n createJobByAdmin: \"services/app/job/CreateJobAsync\",\r\n deleteJobByAdmin: \"services/app/job/DeleteJobAsync\",\r\n getPublishedJobs: \"services/app/job/GetPublishedJobs\",\r\n getJobsByAdmin: \"services/app/job/GetJobsByAdmin\",\r\n getJobById: \"services/app/job/GetJobByIdAsync\",\r\n getJobByUrl: \"services/app/job/GetJobByUrl\",\r\n updateJobByAdmin: \"services/app/job/UpdateJobAsync\"\r\n }\r\n },\r\n userRoles: {\r\n candidate: 'Candidate',\r\n client: 'Client',\r\n admin: 'Admin'\r\n },\r\n activeTab: {\r\n candidate: 'candidate',\r\n client: 'client',\r\n login: 'login',\r\n home: 'home',\r\n admin: 'admin',\r\n howItWorks: 'howItWorks',\r\n aboutUs: 'aboutUs',\r\n corporate: 'corporate',\r\n livingWage: 'livingWage',\r\n faq: 'faq',\r\n termsConditions: 'termsConditions',\r\n policy: 'policy',\r\n news: 'news',\r\n recruitment: 'recruitment',\r\n tempstaff: 'tempstaff',\r\n costEffectiveTempStaff: 'costEffectiveTempStaff',\r\n landingPage: 'landingPage',\r\n jobs: 'jobs',\r\n facilitiesManagement: 'facilitiesManagement',\r\n hospitality: 'hospitality',\r\n finalMileDelivery: 'finalMileDelivery',\r\n warehouse: 'warehouse',\r\n manufacturing: 'manufacturing',\r\n care: 'care',\r\n cantBePigeonholed: 'cantBePigeonholed'\r\n },\r\n bootstrapDateFormat: 'dd-MM-yyyy',\r\n dateFormat: 'YYYY-MM-DD',\r\n timeFormat: 'YYYY-MM-DDTHH:mm:ss',\r\n minHourlyRate: 10,\r\n distance: 10,\r\n buttonLabels: {\r\n rotateLeft: ' ',\r\n rotateRight: ' ',\r\n zoomIn: ' ',\r\n zoomOut: ' ',\r\n fit: ' ',\r\n crop: ' '\r\n },\r\n bookingStatus: [\r\n { id: 0, status: \"Pending\" },\r\n { id: 1, status: \"Accepted\" },\r\n { id: 2, status: \"Refused\" },\r\n { id: 3, status: \"Paid\" },\r\n { id: 4, status: \"Cancelled\" }\r\n ],\r\n userStatus: [\r\n { id: 0, status: \"Pending\" },\r\n { id: 1, status: \"II-legal\" },\r\n { id: 2, status: \"Legal\" },\r\n { id: 3, status: \"Incorrect ID file\" }\r\n ],\r\n receivingEmail: [\r\n { id: 0, receivingEmailStatus: \"Accepted Receiving Email\" },\r\n { id: 1, receivingEmailStatus: \"Requested Stop Receiving Email\" },\r\n { id: 2, receivingEmailStatus: \"Allowed Stop Receiving Email\" }\r\n ],\r\n receivingEmailStatus: {\r\n acceptedReceivingEmail: 0,\r\n requestedStopReceivingEmail: 1,\r\n allowedUserStopReceivingEmail: 2\r\n },\r\n timePickerOptions: {\r\n timeFormat: 'H:i',\r\n disableTextInput: true,\r\n minTime: '00:00',\r\n maxTime: '23:45'\r\n },\r\n timePickerDefault: {\r\n startTime: {hour: 8, minute: 0, second: 0},\r\n endTime: {hour: 20, minute: 0, second: 0}\r\n },\r\n candidateType: {\r\n Main: 0,\r\n Additional: 1,\r\n BestMatch: 2\r\n },\r\n dateOptions: {\r\n formatYear: 'yy',\r\n startingDay: 1\r\n },\r\n pageTypes: {\r\n news: 'Employment News',\r\n recruitmentGuide: 'Recruitment guide',\r\n ownPage: 'Own Page',\r\n employmentSupport: 'Employment support (B)',\r\n employmentSupportNews: 'Employment support (news)'\r\n },\r\n considerPermanentRole: [\r\n { label: 'Yes', value: 'YES' },\r\n { label: 'No', value: 'NO' },\r\n { label: 'Maybe', value: 'MAYBE' },\r\n ],\r\n routes: {\r\n candidate: {\r\n root: 'candidate',\r\n signup: {\r\n main: 'candidate.signup',\r\n step1: 'candidate.signup.step1',\r\n step2: 'candidate.signup.step2',\r\n step3: 'candidate.signup.step3',\r\n step4: 'candidate.signup.step4',\r\n step5: 'candidate.signup.step5',\r\n step6: 'candidate.signup.step6',\r\n step7: 'candidate.signup.step7',\r\n step8: 'candidate.signup.step8',\r\n step9: 'candidate.signup.step9',\r\n alternativeDocumentation: 'candidate.signup.alternativeDocumentation',\r\n noDocument: 'candidate.signup.noDocument',\r\n confirmEmail: 'candidate.signup.confirmEmail',\r\n modeOfTransport: 'candidate.signup.modeOfTransport',\r\n uploadDeliveryDriverDocument: 'candidate.signup.uploadDeliveryDriverDocument',\r\n uploadDBSCertificate: 'candidate.signup.uploadDBSCertificate',\r\n insuranceCode: 'candidate.signup.insuranceCode',\r\n communityInformation: 'candidate.signup.communityInformation',\r\n communityConfirmation: 'candidate.signup.communityConfirmation'\r\n },\r\n portal: {\r\n main: 'candidate.portal',\r\n welcomeBack: 'candidate.portal.welcomeBack',\r\n workfaceProfile: 'candidate.portal.workfaceProfile',\r\n availability: 'candidate.portal.availability',\r\n currentStarRating: 'candidate.portal.currentStarRating',\r\n profileInformation: 'candidate.portal.profileInformation',\r\n uploadPhoto: 'candidate.portal.uploadPhoto',\r\n uploadDocuments: 'candidate.portal.uploadDocuments',\r\n paymentDetails: 'candidate.portal.paymentDetails',\r\n bookingRequests: 'candidate.portal.bookingRequests',\r\n cancelBooking: 'candidate.portal.cancelBooking',\r\n howCommunicate: 'candidate.portal.howCommunicate',\r\n wheelBooking: 'candidate.portal.wheelBooking',\r\n bookingsHistory: 'candidate.portal.bookingsHistory',\r\n ratingStar: 'candidate.portal.ratingStar',\r\n alternativeDocumentation: 'candidate.portal.alternativeDocumentation',\r\n noDocument: 'candidate.portal.noDocument',\r\n modeOfTransport: 'candidate.portal.modeOfTransport',\r\n uploadDeliveryDriverDocument: 'candidate.portal.uploadDeliveryDriverDocument',\r\n uploadDBSCertificate: 'candidate.portal.uploadDBSCertificate',\r\n insuranceCode: 'candidate.portal.insuranceCode',\r\n alreadyToGoAndEarnExtra: 'candidate.portal.alreadyToGoAndEarnExtra',\r\n employmentSupport: 'candidate.portal.employmentSupport',\r\n employmentSupportNews: 'candidate.portal.employmentSupportNews',\r\n yunoQuiz: 'candidate.portal.yunoQuiz',\n helpUsToHelpYou: 'candidate.portal.helpUsToHelpYou',\r\n suitableForCare: 'candidate.portal.suitableForCare',\r\n\t\t\t\t\t\tbecomeEligibleForCare: 'candidate.portal.becomeEligibleForCare',\r\n employmentRecord: 'candidate.portal.employmentRecord',\r\n }\r\n },\r\n client: {\r\n root: 'client',\r\n signup: {\r\n main: 'client.signup',\r\n home: 'client.signup.home',\r\n findMeStaff: 'client.signup.findMeStaff',\r\n clientProfile: 'client.signup.clientProfile',\r\n staffRequirements: 'client.signup.staffRequirements',\r\n candidates: 'client.signup.candidates',\r\n finish: 'client.signup.finish',\r\n confirmEmail: 'client.signup.confirmEmail'\r\n\r\n },\r\n portal: {\r\n main: 'client.portal',\r\n welcomeBack: 'client.portal.welcomeBack',\r\n findTheStaff: 'client.portal.findTheStaff',\r\n contactStaff: 'client.portal.contactStaff',\r\n companyProfile: 'client.portal.companyProfile',\r\n bookingsInformation: 'client.portal.bookingsInformation',\r\n makePayment: 'client.portal.makePayment',\r\n reportIssue: 'client.portal.reportIssue',\r\n howCommunicate: 'client.portal.howCommunicate',\r\n amendBooking: 'client.portal.amendBooking',\r\n reBooking: 'client.portal.reBooking',\r\n confirmedBooking: 'client.portal.confirmedBooking',\r\n permanentRole: 'client.portal.permanentRole',\r\n ratingStar: 'client.portal.ratingStar',\r\n contactCandidates: 'client.portal.contactCandidates'\r\n\r\n }\r\n },\r\n common: {\r\n main: 'common',\r\n termsConditions: 'common.termsConditions',\r\n privacyPolicy: 'common.privacyPolicy',\r\n faq: 'common.faq',\r\n aboutUs: 'common.aboutUs',\r\n //corporate: 'common.corporate',\r\n livingWage: 'common.livingWage',\r\n howItWorks: 'common.howItWorks',\r\n news: 'common.news',\r\n recruitment: 'common.recruitment'\r\n },\r\n login: 'login',\r\n home: 'home',\r\n landingPage: 'landingPage',\r\n tempstaff: 'tempstaff',\r\n costEffectiveTempStaff: 'costEffectiveTempStaff',\r\n jobs: {\r\n root: 'jobs',\r\n main: 'jobs.main',\r\n job: 'jobs.job'\r\n },\r\n resetPassword: {\r\n sendEmail: 'sendEmail',\r\n resetPassword: 'resetPassword'\r\n },\r\n admin: {\r\n root: 'admin',\r\n main: 'admin.main',\r\n export: 'admin.export',\r\n registerVoucher: 'admin.registerVoucher',\r\n emailSender: 'admin.emailSender',\r\n smsSender: 'admin.smsSender',\r\n manageBooking: 'admin.manageBooking',\r\n manageLandingPage: 'admin.manageLandingPage',\r\n deleteUser: 'admin.deleteUser',\r\n stopReceivingEmail: 'admin.stopReceivingEmail',\r\n createLandingPage: 'admin.createLandingPage',\r\n editLandingPage: 'admin.editLandingPage',\r\n jobManagement: 'admin.jobManagement',\r\n createJob: 'admin.createJob',\r\n editJob: 'admin.editJob'\r\n },\r\n corporate: {\r\n main: 'corporate',\r\n facilitiesManagement: 'corporate.facilitiesManagement',\r\n hospitality: 'corporate.hospitality',\r\n finalMileDelivery: 'corporate.finalMileDelivery',\r\n warehouse: 'corporate.warehouse',\r\n manufacturing: 'corporate.manufacturing',\r\n care: 'corporate.care',\r\n cantBePigeonholed: 'corporate.cantBePigeonholed'\r\n }\r\n }\r\n });\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('lx')\r\n .config(config);\r\n\r\n /** @ngInject */\r\n function config($urlRouterProvider, $httpProvider, $locationProvider, $logProvider, ngIntlTelInputProvider, ngToastProvider) {\r\n\r\n $urlRouterProvider.otherwise('/login');\r\n $httpProvider.interceptors.push('authInterceptor');\r\n ngIntlTelInputProvider.set({initialCountry: 'gb'});\r\n // Enable log\r\n $logProvider.debugEnabled(true);\r\n ngToastProvider.configure({\r\n animation: 'slide',\r\n horizontalPosition: 'center',\r\n verticalPosition: 'top'\r\n });\r\n $locationProvider.hashPrefix('!');\r\n $locationProvider.html5Mode(true);\r\n }\r\n\r\n})();\r\n\nangular.module(\"lx\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"app/addLandingPage/landingPage.html\",\"

{{vm.landingPage.title}}

{{vm.errorMessage}}

\");\n$templateCache.put(\"app/costEffectiveTempStaff/costEffectiveTempStaff.html\",\"

Flexibility and an ethical approach doesn\\'t have to cost more

Labour xchange is designed to make, work work for everyone. Our automated systems mean that we are the most cost effective way to hire temporary staff, as we pass on the savings from automation to our users.

Our system is so efficient that the hourly rate paid to the individual is more cost effective than hiring direct

Staff hired directly

  • Minimum wage - £7.50
  • Holiday pay - £0.91
  • ENIC - £0.98
  • Pension - £0.23
  • Payroll and other costs - £0.5
  • Sick pay - £0.05

TOTAL COST £10.17

Labour xchange Staff

  • Hourly rate - £10
  • Holiday pay - £0
  • ENIC - £0
  • Pension - £0
  • Payroll and other costs - £0
  • Sick pay - £0

TOTAL COST £10

info@labourxchange.uk

02037736651

20-22 Wenlock Road, London, N1 7GU

Company reg: 9465567

Vat reg: 24334242

\");\n$templateCache.put(\"app/home/home.html\",\"

Top up your income when convenient to you!

Find additional work that fits around your life. What are you waiting for, get your workface on and start earning when convenient to you!

  • Always free to signup and use
  • Minimum rates start at the Living Wage Foundation calculation
  • No CVs, sign up takes less than 5 minutes
  • No need for constant searching as work comes to you

Find the staff you need, when you need them

Utilise the spare time of talented and motivated individuals to fill your staffing gaps. From two hours on a Sunday to two weeks, our simple process connects you directly with the people you need when you need them.

No CVs or long forms, no waiting for applications, no delays. Simply excellent people ready and eager to work who match directly to your requirements by our easy effective platform.

Need to top up your income? Best get your workface on then !

Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.

There are no complicated application forms, no need for lengthy CVs. It’s a quick and painless process to create your workface profile which then pitches you perfectly to prospective companies. Work that fits around you with a minimum rate of pay based upon the Living Wage Foundation calculation.

Our friends at community

We all want to get on at work. And we all want to do right by our families. But sometimes you need a little more help to know your rights and understand your responsibilities. That’s why Labour xchange is proud to partner with Community, who can provide online advice, support and guidance for individuals who find work through our platform.

Community is the modern union for a changing world. They help people at work, at home and when life gets complicated. Whoever you are, wherever you work, Community can help.

The world of work is changing all around us. It’s more flexible and more complex. So sometimes you need somewhere to turn to for support. If you get work through the Labour xchange platform, then you can be an associate member of Community for free.

You’ll have access to the Labour xchange advice pages of Community’s website so that you know your rights and understand your responsibilities as a self-employed worker.

If you have issues at work and need representation or if you need more help from one of Community’s legally trained advisors, then it’s easy to upgrade to full Community membership to get the support you need. Their rates start at less than £5 a month – a small price to pay for peace of mind at work

\\\"\\\"
\\\"\\\"

We work with charities to make sure work, actually works for everyone.

\\\"We

We have one overriding belief, a few extra hours work per month, paid at a fair rate, can make the world of difference to the lives and living standards of most working people. That is driving force for what we do, not to make a quick buck from others\\' hard work.

We are therefore partnering with charities who share our goals and values in creating a better life for working people.

We are pleased to be credited by the Living wage Foundation

We aim to ensure that everyone getting work through Labour Xchange will be paid a minimum of the living wage, we do this via the unique way we match potential work candidates with potential employers.

We believe that paying at least this minimum amount benefits not only the worker but the employer as well, it improves the reputation of the employer, increases the motivation of the worker and relationship between the employer thus creating a better working environment.

\\\"We
\\\"\\\"

Get in touch

Your comments are really important to us. We want to improve the world of work for everyone, so what ever your thoughts please let us know. We will come back to you as fast as humanly possible!

info@labourxchange.uk

02037736651

20-22 Wenlock Road, London, N1 7GU

Company reg: 9465567

Vat reg: 24334242

\");\n$templateCache.put(\"app/login/login.html\",\"\");\n$templateCache.put(\"app/resetPassword/resetPassword.html\",\"

Reset your password

Sorry, we really need this.
At least 8 characters please.
Password did not match.

{{vm.confirmEmailResponse}}

\");\n$templateCache.put(\"app/resetPassword/sendEmail.html\",\"

What\\'s my password?

Sorry, we really need this.
Ooops try that again.

{{vm.sendEmailResponse}}

\");\n$templateCache.put(\"app/tempstaff/tempstaff.html\",\"

The fastest and most cost effective way to get temporary staff

Fill staffing gaps in under 5 minutes.

What are you waiting for, it really is as quick and easy as “click, click, staff!

Find the staff you need, when you need them

Utilise the spare time of talented and motivated individuals to fill your staffing gaps. From two hours on a Sunday to two weeks, our simple process connects you directly with the people you need when you need them.

No CV’s or long forms, no waiting for applications, no delays. Simply excellent people ready and eager to work who match directly to your requirements by our easy effective platform.

Now its possible to get flexible staffing and still be completely ethical

Every individual who is registered on our platform has selected the times they are free and want to use and earn extra income. So unlike other platforms or agencies the staff that are matched to your requirements genuinely want that work as it fits in with their lives.

Additionally as our system is entirely automated, we not only pass the costs savings on to you, we ensure the individuals are always paid well (at least the living wage)

Our friends at community

We all want to get on at work. And we all want to do right by our families. But sometimes you need a little more help to know your rights and understand your responsibilities. That’s why Labour xchange is proud to partner with Community, who can provide online advice, support and guidance for individuals who find work through our platform.

Community is the modern union for a changing world. They help people at work, at home and when life gets complicated. Whoever you are, wherever you work, Community can help.

The world of work is changing all around us. It’s more flexible and more complex. So sometimes you need somewhere to turn to for support. If you get work through the Labour xchange platform, then you can be an associate member of Community for free.

You’ll have access to the Labour xchange advice pages of Community’s website so that you know your rights and understand your responsibilities as a self-employed worker.

If you have issues at work and need representation or if you need more help from one of Community’s legally trained advisors, then it’s easy to upgrade to full Community membership to get the support you need. Their rates start at less than £5 a month – a small price to pay for peace of mind at work

\\\"\\\"
\\\"\\\"

We are backed by some great organisations

\\\"We
\\\"\\\"

Get in touch

Your comments are really important to us. We want to improve the world of work for everyone, so what ever your your thoughts please let us know. We will come back to you as fast as humanly possible!

info@labourxchange.uk

02037736651

20-22 Wenlock Road, London, N1 7GU

Company reg: 9465567

Vat reg: 24334242

\");\n$templateCache.put(\"app/admin/modal/changeStatus.html\",\"\");\n$templateCache.put(\"app/admin/modal/deleteJobModal.html\",\"
\");\n$templateCache.put(\"app/admin/modal/deleteSenderModal.html\",\"
\");\n$templateCache.put(\"app/admin/modal/deleteUserModal.html\",\"
\");\n$templateCache.put(\"app/admin/modal/editLandingPage.html\",\"
\");\n$templateCache.put(\"app/admin/modal/editSender.html\",\"
\");\n$templateCache.put(\"app/admin/modal/editVoucher.html\",\"
\");\n$templateCache.put(\"app/admin/modal/testSender.html\",\"
\");\n$templateCache.put(\"app/admin/modal/viewDocument.html\",\"
\");\n$templateCache.put(\"app/admin/modal/viewInsuranceCode.html\",\"
\");\n$templateCache.put(\"app/admin/modal/viewPassport.html\",\"
\");\n$templateCache.put(\"app/admin/modal/viewPhotoOrVideo.html\",\"
\");\n$templateCache.put(\"app/admin/partials/admin.html\",\"

Admin

Zego Status
Sorry, we really need this.

Status: {{vm.zego.status}}

Login/Logout Zego
Sorry, we really need this.

Status: {{vm.zego.status}}

Search User
Username Candidate Name Photo/Video Passport Another Document Insurance Code Status
Verified Y/N Verified Email Address
{{list.userName}}{{list.name}}View/Edit AddView/Edit AddView/Edit Add

View

{{vm.listPassportResponse}}

\");\n$templateCache.put(\"app/admin/partials/create-job.html\",\"

Create job

Sorry, we really need this.
Sorry, we really need this.
Sorry, this url ready exists.
Sorry, we really need this.
Sorry, invalid postcode.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
ValidThrough is invalid.
You must be larger today
Sorry, we really need this.
\");\n$templateCache.put(\"app/admin/partials/create-landing-page.html\",\"

Create content

Sorry, we really need this.
Upload Image
\");\n$templateCache.put(\"app/admin/partials/delete-user-page.html\",\"

Users list

Search User
ID Username Name Action
{{list.id}}{{list.userName}}{{list.name}}

{{vm.listUsersResponse}}

\");\n$templateCache.put(\"app/admin/partials/edit-job.html\",\"

Edit job

Sorry, we really need this.
Sorry, we really need this.
Sorry, this url ready exists.
Sorry, we really need this.
Sorry, invalid postcode.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
ValidThrough is invalid.
You must be larger today
Sorry, we really need this.
\");\n$templateCache.put(\"app/admin/partials/edit-landing-page.html\",\"

Edit content

Upload Image
\");\n$templateCache.put(\"app/admin/partials/email-sender.html\",\"

Email Sender

Create email sender
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
{{$item.name}}{{category.name}}
Upload template copy
{{vm.copyOfEmailTemplate.name}}
The following variables are available to use in the templates:
  • %recipient.name% = User\\'s first name
  • %recipient.fullname% = User\\'s first name and surname together
  • %recipient.lxid% = User\\'s Labour xchange ID number
Email Name Send FromSend ToSend FirstSend FrequencyLive
{{list.senderName}}{{list.sendFromVariable.name}}{{list.sendToVariable.name}}{{list.sendFirstVariable.name}}{{list.sendFrequencyVariable.name}}

No email sender

\");\n$templateCache.put(\"app/admin/partials/export-excel.html\",\"

Report

First Name Surname Email Address First RegisterPostcodeVerified Y/NLast booking (or n/a)Last LoginPassport uploaded Y/NVideo uploaded Y/NPhoto Uploaded Y/NMobileNo
{{list.name}}{{list.surname}}{{list.emailAddress}}{{list.creationTime | date:\\'dd/MM/yyyy\\'}}{{list.profile.address.postCode}}{{list.isEmailConfirmed?\\'Y\\':\\'N\\'}}{{((list.lastBooking !== null) ? (list.lastBooking | date: \\'dd/MM/yyyy\\') : \\'\\' )}}{{((list.lastLogin !== null) ? (list.lastLogin | date: \\'dd/MM/yyyy\\') : \\'\\' )}}{{list.profile.passportUrl? \\'Y\\':\\'N\\'}}{{list.profile.videoUrl? \\'Y\\':\\'N\\'}}{{list.profile.photoUrl? \\'Y\\':\\'N\\'}}{{list.profile.mobileNumber}}

{{vm.listCandidateResponse}}

First Name Surname Email Address First RegisterPostcodeVerified Y/NLast booking (or n/a)Last LoginType of businessesType of workTelNo
{{list.name}}{{list.surname}}{{list.emailAddress}}{{list.creationTime | date:\\'dd/MM/yyyy\\'}}{{list.companyProfile.address.postCode}}{{list.isEmailConfirmed?\\'Y\\':\\'N\\'}}{{((list.lastBooking !== null) ? (list.lastBooking | date: \\'dd/MM/yyyy\\') : \\'\\' )}}{{((list.lastLogin !== null) ? (list.lastLogin | date: \\'dd/MM/yyyy\\') : \\'\\' )}}
  • {{type.name}}
  • {{type.name}}
{{list.companyProfile.telephoneNumber}}

{{vm.listClientResponse}}

\");\n$templateCache.put(\"app/admin/partials/job-management.html\",\"

Job Management

TitleUrlDescriptionPublished
{{job.title}}{{vm.baseUrl}}{{job.url}}{{job.isPublished? \\'Yes\\':\\'No\\'}}

Edit

Delete

{{vm.listJobResponse}}

\");\n$templateCache.put(\"app/admin/partials/landing-pages.html\",\"

Additional content list

UrlPart ofLive
{{vm.baseUrl}}{{list.url}}{{list.pageType.name}}{{list.isPublished? \\'Yes\\':\\'No\\'}}

Edit

{{vm.listCandidateResponse}}

\");\n$templateCache.put(\"app/admin/partials/manage-booking.html\",\"

Manage Booking

Note:

   Main candidate

   Additional candidate

Search Booking
{{$item.name}}{{category.name}}
{{$item.name}}{{item.name}}
{{$item.name}}{{item.name}}
Booking Id Created Date Client Name Candidate Name Status Post codeType of workKey skillKey experienceEmployment Status
{{booking.id}}{{booking.creationTime|date:\\'dd/MM/yyyy\\'}}{{booking.clientUser.name}}
  • {{potentialCandidate.candidateUser.name}} - {{potentialCandidate.candidateUser.emailAddress}}
{{vm.bookingStatus(booking.status)}}{{booking.address.postCode}}
  • {{type.name}}
  • {{keySkill.name}}
  • {{keyExperience.name}}
  • {{employmentStatus.name}}

{{vm.listBookingResponse}}

\");\n$templateCache.put(\"app/admin/partials/receiving-email-page.html\",\"

Users list

Search User
ID Username Name Receiving email status
{{list.id}}{{list.userName}}{{list.name}}

{{vm.listUsersResponse}}

\");\n$templateCache.put(\"app/admin/partials/register-voucher.html\",\"

Voucher code register

Create voucher
Sorry, we really need this.
Sorry, this code is ready register.
Sorry, we really need this.
Sorry, we really need this at least £1.
Expiry is invalid.
Sorry, we really need this.
You must be larger today
Code Value Expired Date Main Code
{{list.code}}{{list.value | currency:\\'£\\'}}{{list.expiry| date:\\'dd/MM/yy\\'}}

{{vm.listVoucherResponse}}

\");\n$templateCache.put(\"app/admin/partials/sms-sender.html\",\"

SMS Sender

Create sms sender
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
Sorry, we really need this.
{{$item.name}}{{category.name}}
Sorry, we really need this.
Email Name Send ToSend FirstSend FrequencyLive
{{list.senderName}}{{list.sendToVariable.name}}{{list.sendFirstVariable.name}}{{list.sendFrequencyVariable.name}}

No sms sender

\");\n$templateCache.put(\"app/candidate/portal/portal.html\",\"
\");\n$templateCache.put(\"app/candidate/signup/signup.html\",\"\");\n$templateCache.put(\"app/client/portal/portal.html\",\"
\");\n$templateCache.put(\"app/client/signup/signup.html\",\"\");\n$templateCache.put(\"app/components/candidates/candidates.html\",\"
= 3}\\\">
= 1\\\">
= 2\\\">
= 3\\\">
= 1\\\">= 2\\\">= 3\\\">

{{vm.noCandidateAll}}

\");\n$templateCache.put(\"app/components/common/comingSoon.html\",\"\");\n$templateCache.put(\"app/components/common/confirmEmail.html\",\"\");\n$templateCache.put(\"app/components/common/receivedEmail.html\",\"\");\n$templateCache.put(\"app/components/dateTimePicker/dateTimePickerHome.html\",\"
\");\n$templateCache.put(\"app/components/dateTimePicker/dateTimePickerPortal.html\",\"
\");\n$templateCache.put(\"app/components/footer/footer.html\",\"\");\n$templateCache.put(\"app/components/loading/loading.html\",\"
\");\n$templateCache.put(\"app/components/nav/nav.html\",\"

Please review our privacy policy and accept to continue using Labour Xchange

\");\n$templateCache.put(\"app/components/pdf-viewer/pdf-viewer.html\",\"
\");\n$templateCache.put(\"app/components/profile/profile.html\",\"\");\n$templateCache.put(\"app/components/scroll-top/scroll-top.html\",\"
\");\n$templateCache.put(\"app/components/signature-pad/signature-pad.directive.html\",\"
\");\n$templateCache.put(\"app/common/aboutUs/aboutUs.html\",\"

About us

Labour xchange has a simple yet important mission; we connect individuals with spare time who want to earn extra cash with businesses who every now and then need additional staff.

By fulfilling this mission, we can help people increase their income whilst helping businesses grow and prosper. Everything we do is driven by our core belief that everyone should benefit in the employment market, a win win scenario with no losers.

How does the Labour xchange platform work?

See our “how it works page”

Who is behind Labour xchange?

In short normal everyday people:

  • People who have experienced what it is like to desperately need slightly more money to cover all the bills.
  • People who know how difficult it is in the current employment market to find work that fits around current employment or other commitments.
  • People who have experience in running companies and know the difficulty in getting good ad hoc staff to cover changes in staffing or demand.
  • People who believe the world of work should work for everyone.

Our founder Jonathan Key has had the privilege to work in a wide variety of environments and roles in which he experienced first-hand the dysfunctional employment market. It was this first-hand experience that made him realise there must be a better way for people and business to connect.

Our partnerships

We are proud to work in partnership with Community trade union, we believe a good modern trade union is not only essential to a positive and safe workplace but more importantly leads to a better and more productive business.

We also work with a variety of charities to ensure all Labour xchange users can access the support they need whether it be debt advice, training or employment advice.

Our social mission

In addition to empowering people to earn more money we take our social responsibility further and donate 15% of all generated profit to our charity partners. We are not out to make a quick buck from others\\' hard work, instead we make a lasting and positive difference to our society.

All ears

We really want both people and business to mutually benefit from our platform, therefore if you have any suggestions or comments (good or bad) please, please drop us a line. For details on how to contact us please see our “contact page”

\");\n$templateCache.put(\"app/common/corporate/corporate.html\",\"

The ethical on demand staffing solution

Get access to thousands of people local to your operations

Ability to book staff within one hour

Be the good guys, our ethical approach means you will be doing the right thing

Lower costs than any agency

A true win win

There are over 7 million people in the UK who cannot work enough hours as they cannot find work opportunities that fit around current commitments. Individuals such as the underemployed, parents and carers.

Labour xchange enable your organisation to utilise these people\\'s free time, so you get the best staff as required and these hardworking people get additional income that fits around their life.

Find out more

Fully integrated staffing solution

We integrate the labour xchange platform with your scheduling software so individuals can be booked automatically when a staffing gap appears.

As everyone has already confirmed their availability people can be booked and on premises in under an hour.

Endorsed and backed by trade unions

As our approach is radically different we create a win for you and the worker. This ethical model is endorsed and backed by our friends at Community trade union, which means yes you could be the good guys and get the staff you need.

Our cutting edge technology and automated process gives us a substantially lower cost base, which we pass on to you in the form of reduced fees and then to the workers in the form of higher hourly rates.

Did we mention you could be the good guys?

We are also backed by charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

\");\n$templateCache.put(\"app/common/faq/faq.html\",\"

FAQ – FOR INDIVUDALS

Q - What’s labour xchange? A - First and most importantly we are not an agency, we are an independent platform that connects individuals to employers in an open and fair way.
Q – How does Labour xchange work? A – Check out our “how it works page”
Q – What can Labour xchange offer that’s different from job boards and agencies? A – Labour xchange is based around real life, your life. You can select the hours you want to work and let employers contact you with offers of adhoc employment. Work and income that fits around you and your life.
Q – Can I earn a full time living from Labour xchange A – No is the short answer. However you can significantly top up your income when convenient, as well as build valuable experience that can lead to better employment prospects.
Q – Am I employed by Labour xchange A – No, Labour xchange is just a platform (a very clever one) that enables you to connect and gain work with businesses. All work carried out by individuals on the Labour xchange platform is as self- employed. You must therefore make arrangements to pay your own tax as a self-employed worker. As a Labour xchange user, you can access free support and guidance from Community Trade Union, the details for which can be found on your portal once you have signed up.
Q – Am I employed by the business for which I carry out work? A – No, you are carrying out work for the business as a self-employed individual. However should a business continue to repeatedly book you we will insist they offer you a workers contract.
Q – How does Labour xchange make money, does it charge me fees? A – No, Labour xchange never charges individuals for using the platform nor do we take a percentage of your earnings. To cover costs Labour xchange make an additional small administration fee to the business booking your time. Our theory is “you work hard and you should get the money for your work”
Q – Is Labour xchange another gig economy platform that pretends people are self employed when they are employed? A – No, each booking you carry out will likely be for a different employer on an ad hoc basis. If an employer likes you and keeps booking you we insist they offer you an appropriate contract. We also ensure you will always be paid, and paid at least the Living Wage Foundation calculation to cover any inconvenience and cost of being self employed.
Q – Does Labour xchange guarantee I will find work through the platform? A – Unfortunately not, as you will only be matched to employers who are seeking your available hours and work preferences. However we offer tips and guidance on how to make sure your profile is optimised. Through our algorithms we offer guidance on the most sought hours and skills by employers in your area, so you can tweak your profile.
Q – I haven`t got an up to date CV or the time to make one. A – That’s fine, we don`t believe in restrictive CV`s. Create your profile, add a 20 second video and you’re good to go, the sign up process should take less than 6 minutes in total.
Q – Why does Labour xchange work with charities? A – For two reasons:
  • Our platform is not suitable for everyone. If you are looking to a solution to a debt problems, lack of skills or suffer from low pay and poor conditions in your current workplace one of our partners may be better at supporting you. We want to ensure that everyone who comes to Labour xchange leaves better off, even if means passing you on to one of our charity partners for advice and help.
  • Each year 15% of our profits are donated to charities that support working people. We believe work should work for everyone!
Q – How does the star rating system work? A – The star ratings for individuals are based on three elements.
  • Completeness of profile. This includes the uploading of a photo or video.
  • Responsiveness to booking requests. We ask that you reply to booking requests even if its to reject the booking. If you consistently do not reply to booking requests this will affect your star rating (it`s just about good manners really.)
  • Ratings from your previous bookings. At the end of each booking the business you have worked for is asked to rate you on: Punctuality, attitude and quality of work. We collate the ratings which then affect your overall rating.
Our rating system is simple and transparent, it is designed so you can build your reputation and command increased work and rates.
Q - What happens if I accept a booking but my circumstances change? A - Please let us know by cancelling the booking through your portal in the bookings page. If you continuously cancel bookings it may affect your star rating. Should you fail to turn up to a booking and not let us know you are unable to attend you star rating will go down to zero.
Q – How and when do I get paid? A – Once you have confirmed you are able to attend a booking the business pays upfront via debit card for your time. We hold these funds on your behalf until the booking has been completed. Once the booking is complete we transfer your fee via bacs within twelve hours. We believe you should get paid as soon a physically possible.
Q – Why do I have to take my passport to every booking even though I have uploaded a copy? A – To meet government requirements all employers must see original proof of eligibility to work documents. Although an uploaded copy demonstrates you should meet the requirements it essential you provide the original at all bookings. If you fail to bring your original passport the business will have to send you home without working and you will not be paid.

FAQ – FOR BUSINESS

Q- What is Labour xchange? A - Firstly and most importantly we are not an agency, we are a platform that connects individuals to employers in an open and fair way.
Q – How does Labour xchange work? A – Check out our “how it works page”
Q – So, is Labour xchange like a job board, where I post role and have to wait until people apply to the role? A – No, candidates log their upcoming availability in advance so when you search for staff we will return candidates who have already confirmed they are available to work. We then contact them to confirm their attendance. The whole process starting the search to booking confirmation should take less than four hours.
Q – How much does it cost to hire a candidate? Short answer, a minimum of the Living Wage Foundation calculation for the candidate and an administration fee of £10 per day. However candidates may decide to ask for a higher hourly rate as their star rating improves. Therefore, should you book a candidate for seven hours on one day you would pay £70 to the candidate and a £10 admin fee to Labour xchange.
Q – Who pays the workers tax? A – All candidates found through Labour xchange work on a self employed basis, they are not employed by Labour xchange. The workers are therefore responsible for paying their own tax.
Q – Can I continously use the same candidate for bookings? A – No, if you continously book the same candidate they are becoming a worker with direct relationship with your company. Therefore should you try to book the candiate for either more than two weeks or for three separate times in four months the system will prevent the booking. Should this happen we suggest you hire them directly on an appropirate contract.
Q – Can I permently hire a candidate found through Labour xchange? A – Very much so, our platform is a good way to trial potential staff out before a permanent contract is offered. We charge a £165 administration fee to permanently recruit a candidate found on the system. As part of the £165 administration fee we:
  • Provide you with template contracts to complete and offer the candidate.
  • Transfer employment details of the candidate.
  • Provide the candidate a £30 bursary to help with costs associated with changing employment.
Q – How do I ensure the candidate is suitable, do you vet them? A – We provide you with the tools to identify the candidates best suited to your business but do not vet them for you. Our algorithm will return the three candidates that best match your criterea then should review their “star rating”, profile, and workface video to ensure they match your requirements. Whilst we provide the best matches we believe you are the most qualified to decide on a candidates suitability.
Q – How does the star rating system work? A – The star ratings for individuals are based on three elements.
  • Completeness of profile. This includes the uploading of a photo or video.
  • Responsiveness to booking requests. We ask that you reply to booking requests even if its to reject the booking. If you consistently do not reply to booking requests this will affect your star rating (it`s just about good manners really)
  • Ratings from your previous bookings. At the end of each booking we ask you to rate the candidate on: Punctuality, attitude and quality of work. We collate the ratings which then affect their overall rating.
At the end of each booking we also ask the candidates to rate their experience working for you. When a candidate receives a booking request from your business they are able to see the rating for your business as an employer which may affect their decision whether to accept the booking. We believe our ratings system provide you and the candidate an honest and transparent way to access suitability, however if you have any questions or concerns please “contact us”
Q – How and when do I get charged? A – Once the candidate has confirmed attendance we ask you to make a payment via debit or credit card for the cost of the whole booking. We then hold these funds and release them to the candidate once the booking is complete. In the unlikely event the candidate fails to attend please report their absence through your portal “report issue” page, and a full refund will be issued.
Q – Why do I have check the worker’s passport when they arrive? A – To meet government requirements all employers must see original proof of eligibility to work documents. Although an uploaded copy demonstrates they should meet the requirements it is essential they provide the original at all bookings. If they fail to bring their original passport, please send them home and let us know so you will not be charged.
\");\n$templateCache.put(\"app/common/howItWorks/howItWorks.html\",\"

How it works

How it works for candidates

How it works for business

How it works for candidates

How it works for business

\");\n$templateCache.put(\"app/common/howItWorks/howItWorksForBusiness.html\",\"

How it works for business

\");\n$templateCache.put(\"app/common/howItWorks/howItWorksForCandidate.html\",\"

How it works for candidate

\");\n$templateCache.put(\"app/common/livingWage/livingWage.html\",\"

A guide for Living Wage employers

Version 0.9

Simple logo usage guidelines

Contents

This document outlines logo usage for employers in a few key situations ensuring the mark is displayed appropriately at all times.

1

How to become a Living Wage employer

2

The Living Wage master mark

3

The Living Wage employers mark

4

Colour palette

5

Exclusion zone

6

Signage example: sticker

7

Contact us

How to become a Living Wage employer

What is a Living Wage employer?

A living wage employer ensures that all employees aged 18 and over, including certain classes of contracted staff, are paid at least the living wage. The employer also agrees to increase the amount which it pays to employees by the same amount as any increase in the living wage within six months of the date of the official announcement.

Which contracted staff are included?

A key success of the living wage campaign has been ensuring that workers such as cleaners are afforded respect and dignity. The test for whether a contracted workerfalls within the ambit of the living wage depends on the regularity of service and the location of their work. In simple terms, a living wage employer will ensure contracted workers are paid a living wage in the following circumstances: the workeris on the employer’s premises fortwo or more hours per week, for eight or more consecutive weeks in the year. Full details are contained in the living wage employer accreditation agreement.

Are interns or apprentices included in the requirement?

No.

What is living wage accreditation?

Living wage employer accreditation is managed by citizens UK and provides employers with a licence to the living wage employer mark. The accreditation process is simple and is open to employers already paying the living wage, orthose committed to an agreed timetable of implementation.

What support can you provide with implementation?

We work closely with a range of organisations, including large private sector companies, public sector organisations and charities and community groups. We can provide access to sample clauses in procurement documents and case studies from existing living wage employers.

The Living Wage master mark

The master mark is used to referto the Living Wage organisation and campaign.

The Living Wage Employer mark

The employer mark is exclusively issued to all employers are accredited by the Living Wage Foundation, enabling them to tell the world that they are a Living Wage employer.

Colour palette

The Living Wage colour palette is bright, colourful and positive. Ensure the correct colour values are used in logo reproduction.

Exclusion zone

The Living Wage logo exclusion zone ensures clarity at all times.

It is calculated by keeping the width of the orange circle as clear space around the logo in all spaces it is applied.

Signage example: Sticker

The Living Wage employers mark is designed to be displayed to the outside world to show your commitment and to raise awareness

Get in touch

If you are interested in learning more about the Living Wage please contact The Living Wage Foundation or visit www.livingwage.org.uk

The Living Wage Foundation

Citizens UK

112 Cavell Street

London E1 2JA

+44 (0) 20 7043 9882

info@livingwage.org.uk

\");\n$templateCache.put(\"app/common/modal/ratingStar.html\",\"\");\n$templateCache.put(\"app/common/news/news.html\",\"

EMPLOYMENT NEWS

{{vm.listLandingResponse}}

1\\\">

EMPLOYMENT NEWS


{{item.creationTime | date:\\'dd/MM/yy\\'}}


{{item.title}}

\");\n$templateCache.put(\"app/common/privacyPolicy/privacyPolicy.html\",\"

Privacy Policy

Labour Xchange is a members site operated by Labour Xchange Limited.
This privacy policy explains how we use the personal information we collect about you when you use the Website.
If you register on the Website as a candidate and provide us with personal data, we will process such personal data on the basis that it is necessary to do so in order to link you with work from an appropriate business looking for workers that fit in with the data you have supplied us.
Registration with and use of the Website for candidates is free and we will process your personal data on the basis set out below as it is in our legitimate interests to do so following your registration.

What Information do we collect about you?

We collect personal data about you when you register with the Website. We do so in order to connect you with possible work opportunities that are available through the Website as well as for administrative purposes when you accept work through the Website.
The personal data that we collect includes your name, email address, location postcode and telephone number. We will also ask for details of the kind of work you are looking for, what experience and the distance you are prepared to travel for work. To ensure you are entitled to work in the UK we will also ask you to upload copies of relevant documents such as your passport, other similar document or information that confirms your right to work and verify you as a candidate. We will keep that information for as long you want to keep your work profile with the Website.

What do we do with your personal data?

By registering with Labour Xchange it is understood that candidates are actively soliciting contact from prospective employers about work opportunities which match the candidates work interest. If you are a candidate, we will therefore make your personal data available to employers who use the Website to find suitable workers for specific work opportunities that arise. We will also share your personal data, name, email address with our partners at the Community Union who will contact you about the benefits they can offer in regard to the work environment.
The primary purpose of Labour Xchange is to allow candidates and prospective employers to find each other, job seekers have control over what information is loaded to the site but should be aware that this information is normally needed by a perspective employer to check whether the candidate has the right to work in the UK.
For candidates, we will use your personal data to notify you of any work opportunities that may become available that link to the criteria within your submitted work profile, these notifications will take the form of email, SMS or possible a telephone call if there is a short notice work offer.
By registering with Labour Xchange you have shown an interest in the possible work opportunities available, your details will only be used to communicate with you about work that are relevant to your work profile and to manage your account.

Marketing

When you register with labour Xchange as a candidate we will only send you information which relates to possible work or the need for verifying documents in relation to working. You may also receive marketing emails from our union partner Community which you can opt out of at any time.

Data Sharing and Transfers

We will only share or transfer data where it is necessary to do so in order to provide you with an offer of work from an employer, we do not share your personal data with third parties.
Your personal data is stored on our servers which are in the European Economic Area. If we share your personal data with any third-party service provider in the course of providing you with our services, those third parties are required to process your data in accordance with contracts which comply with data protection legislation.

Access to your information and correction

We always want to make sure that your information is accurate and up-to-date and will delete or amend any information that you think is inaccurate. This can be done by contacting us via data@labourxchange.uk and should you wish to delete or close your account please contact us using via data@labourxchange.uk using the same email address in which you registered your account with. You can also amend your account online by signing in to your work profile and making the necessary changes.
We aim to provide you with useful work-related services for the whole of your career. However, you have the right to close your account at any time and have us delete all of your personal information unless we are in the process of responding to any complaint that you make.

Cookies

Cookies are text files placed on your computer to collect standard internet log and visitor behaviour information. This information is used to track visitor use of the Website, to compile statistical reports on Website activity and to help us make recommendations that are relevant to you.
We also use third party advertising companies to serve ads when you visit the Website. Those companies may use information about your visits to this and other websites in order to provide you with advertisements about other goods and services that may be of interest to you.
If you would like more information about this practice, including how to prevent it, please visit www.aboutcookies.org, www.allaboutcookies.org or optout.networkadvertising.org

Other websites

Our Website contains links to other websites. This privacy policy only applies to this Website, so when you link to other websites you should review their own privacy policies.

Changes to our Privacy Policy

We keep our privacy policy under regular review and we place any updates on this web page. This policy was last updated on 1st May 2018.

How to contact us

Please contact us if you have any questions about our privacy policy or information we hold about you:
or write to us at Data Protection Officer, Labour Xchange Ltd, 20 – 22 Wenlock Road, London, N1 7GU

How do you remove your name from the database?

You can contact us via email at data@labourxchange.uk to request for your account to be closed at any time, this will then be confirmed by Labour Xchange once completed but no longer than 5 working days.

How can you obtain information held about you?

You have the right to request a copy of the information that we hold about you. If you would like a copy of some or all of your personal information, please email us at data@labourxchange.uk

Registered Office

  • Labour Xchange Ltd
  • 30 Park Lane
  • Southend on Sea
  • SS1 2SL
  • Company Number 09465567. Registered in the UK.
    \");\n$templateCache.put(\"app/common/recruitmentGuide/businessGuide.html\",\"

    Guide to Business Recruitment

    Part

    {{business.content}}

    \");\n$templateCache.put(\"app/common/recruitmentGuide/individualsGuide.html\",\"

    Uber driver win employment rights

    21/06/2017
    Need an extra income but find it difficult to find work that fits around an existing job, kids, caring commitments or any other constraints? The answer is simple, create your workface profile, detail when you are available to work and our system will match you directly with local employers wanting those hours worked.
    create your workface profile, detail when you are available to work and our system will match you directly with local
    \");\n$templateCache.put(\"app/common/recruitmentGuide/recruitment.html\",\"

    EMPLOYMENT

    {{vm.listLandingResponse}}

    1\\\">

    RECRUITMENT


    {{vm.listLandingResponse}}
    0\\\">

    {{item.creationTime | date:\\'dd/MM/yy\\'}}


    {{item.title}}

    \");\n$templateCache.put(\"app/common/termsConditions/termsConditions.html\",\"

    Terms of Use

     

    Understanding your rights and responsibilities as a Labour xchange user

    Privacy Reminder

    Protect your personal information by never providing, credit/debit card or bank account numbers or personal details to prospective hiring companies.

    Definitions

    Company – This is the business using the Labour xchange site to look for staff. This may be a limited Company, partnership, public limited Company or sole trader.

    Site – This is the Labour xchange platform

    Worker – This is the individual using the Labour xchange site to find additional work to boost their income.

    Labour xchange – The name for Labour xchange Ltd, the sole proprietor of the Labour xchange site and workface profile ©

    Workface and Profile – The system in which Workers detail their availability, preferred work type and skills linked. Also includes the ability to publish a video/photo. A Company can then view this access suitability for temporary employment.

    Your and You – The end user, includes both Workers and Workers and is dependent to whom the clause applies

    Company portal – The portal which enables each individual company to login change details and search for staff.

    Worker portal – The portal which enables each individual worker to login, change details and amend their profile.

    Booking – The offer of work by an employer and the agreement to work by a worker.

     

     

    Terms of Use

    This page states the Terms of Use (\\\"Terms\\\") under which you (\\\"You\\\") may use the Labour xchange Sites and the Services (each as defined below). These Terms include the Labour xchange Privacy Policy, which is incorporated into these Terms by reference.

    These Terms constitute a binding agreement between You and Labour xchange, and are deemed accepted by You each time that You use or access any Labour xchange Site or Labour xchange Services. If You do not accept the Terms stated here, do not use the Labour xchange Sites and the Labour xchange Services.

    The Labour xchange Sites are defined as any Web sites under Labour xchange’s control, whether partial or otherwise and include the Labour xchange Site. The Labour xchange Site is defined as the applications and services offered by Labour xchange, including an on-line service to note availability for and search temporary work opportunities and including any application accessed through the Labour xchange Site and/or any mobile or other interface that allows You to access such application (collectively, “Labour xchange Services”). The Labour xchange Sites also allow Workers to create individual profiles, which may include personal information (” Workface”), and to make these Profiles, or aspects thereof, public. Labour xchange may revise these Terms at any time by posting an updated version to this Web page. You should visit this page periodically to review the most current Terms because they are binding on You.

    Users who violate these Terms may have their access and use of the Labour xchange Sites suspended or terminated, at Labour xchange’s sole discretion.

    You must be 18 years of age or older to visit or use any Labour xchange Site in any manner, and, if under the age of 18 or the age of majority as that is defined in Your jurisdiction,.

    You may not use the Labour xchange Content or Profiles to determine a consumer\\'s eligibility for: (a) credit or insurance for personal, family, or household purposes; (b) employment; or (c) a government license or benefit.

    1. Use of Labour xchange Content.

    Labour xchange authorises You, subject to these Terms, to access and use the Labour xchange Sites and the Labour xchange Content (as defined below) and to download and print a single copy of the content available on or from the Labour xchange Sites solely for Your personal, non-commercial use. The contents of the Labour xchange Sites, such as designs, text, graphics, images, video, information, logos, button icons, software, audio files and other Labour xchange content (collectively, \\\"Labour xchange Content\\\"), are protected under copyright, trademark and other laws. All Labour xchange Content is the property of Labour xchange. The compilation (meaning the collection, arrangement and assembly) of all content on the Labour xchange Sites is the exclusive property of Labour xchange and is protected by copyright, trademark, and other laws. Unauthorised use of the Labour xchange Content may violate these laws and/or applicable communications regulations and statutes, and is strictly prohibited. You must preserve all copyright, trademark, service mark and other proprietary notices contained in the original Labour xchange Content on any authorised copy You make of the Labour xchange Content.

    Any code that Labour xchange creates to generate or display any Labour xchange Content or the pages making up any Labour xchange Site is also protected by Labour xchange\\'s copyright and You may not copy or adapt such code.

    You agree not to sell or modify the Labour xchange Content or reproduce, display, publicly perform, distribute, or otherwise use the Labour xchange Content in any way for any public or commercial purpose, in connection with products or services that are not those of the Labour xchange Sites, in any other manner that is likely to cause confusion among Workers, that disparages or discredits Labour xchange, that dilutes the strength of Labour xchange\\'s property, or that otherwise infringes Labour xchange\\'s intellectual property rights. You further agree to in no other way to misuse Labour xchange Content. The use of the Labour xchange Content on any other application, web site or in a networked computer environment for any purpose is prohibited. Any code that Labour xchange creates to generate or display any Labour xchange Content or the pages making up any Application or Service is also protected by Labour xchange\\'s copyright and you may not copy or adapt such code.

    1. Use of the Labour xchange Services.

    The “Work face” profile (“Labour xchanges profile Database”) and other features of the Labour xchange Sites may be used only by Workers seeking temporary employment and by Companies seeking temporary staff. Your use of the Labour xchange Services is also subject to any other contracts You may have with Labour xchange. In the case of any conflict between these Terms and any contract you have with Labour xchange, the terms of your contract will prevail. The term “Create” as used herein shall mean information that You submit, publish or display on a Labour xchange Site.

    You are responsible for maintaining the confidentiality of Your account, Profile and passwords, as applicable. You may not share Your password or other account access information with any other party, temporarily or permanently, and You shall be responsible for all uses of Your Labour xchange Site registrations and passwords, whether authorised by You. You agree to immediately notify Labour xchange of any unauthorised use of Your account, Profile, or passwords via the report abuse link.

    All Labour xchange Users agree to not:

    (a) transmit, post, distribute, store or destroy material, including without limitation Labour xchange Content, in violation of any applicable law or regulation, including but not limited to laws or regulations governing the collection, processing, or transfer of personal information, or in breach of Labour xchange’s privacy policy;

    (b) take any action that imposes an unreasonable or disproportionately large load on any Labour xchange Site\\'s infrastructure;

    (c) use any device to navigate or search any Labour xchange Site other than the tools available on the Site, generally available third party web browsers, or other tools approved by Labour xchange;

    (d) use any data mining, robots or similar data gathering or extraction methods;

    (e) violate or attempt to violate the security of any Labour xchange Site including attempting to probe, scan or test the vulnerability of a system or network or to breach security or authentication measures without proper authorization;

    (f) forge any TCP/IP packet header or any part of the header information in any e-mail or newsgroup posting;

    (g) reverse engineer or decompile any parts of any Labour xchange Site;

    (h) aggregate, copy or duplicate in any manner any of the Labour xchange Content or information available from any Labour xchange Site, including expired job postings, other than as permitted by these Terms;

    (I) frame or link to any Labour xchange Content or information available from any Labour xchange Site, unless permitted by these Terms;

    (j) post any content or material that promotes or endorses false or misleading information or illegal activities, or endorses or provides instructional information about illegal activities or other activities prohibited by these Terms, such as making or buying illegal weapons, violating someone\\'s privacy, providing or creating computer viruses or pirating media;

    (k) create a Workface profile on behalf of another party;

    (l) set more than one copy of the same “workface profile at any one time;

    (m) share with a third party any login credentials to any Labour xchange Site;

    (o) access data not intended for You or logging into a server or account which You are not authorised to access;

    (p) post or submit to any Labour xchange Site any incomplete, false or inaccurate biographical information or information which is not Your own;

    (q) post content that contains restricted or password-only access pages, or hidden pages or images;

    (r) solicit passwords or personally identifiable information from other Users;

    (s) delete or alter any material posted by any other person or entity;

    (t) harass, incite harassment or advocate harassment of any group, Company, or individual;

    (u) send unsolicited mail or email, make unsolicited phone calls or send unsolicited faxes.

    (v) attempt to interfere with service to any User, host or network, including, without limitation, via means of submitting a virus to any Labour xchange Site, overloading, \\\"flooding\\\", \\\"spamming\\\", \\\"mailbombing\\\" or \\\"crashing\\\";

    (w) promote or endorse an illegal or unauthorised copy of another person\\'s copyrighted work, such by as providing or making available pirated computer programs or links to them, providing or making available information to circumvent manufacture-installed copy-protect devices, or providing or making available pirated music or other media or links to pirated music or other media files; or

    (x) use the Labour xchange Services for any unlawful purpose or any illegal activity, or post or submit any content, resume, or job posting that is defamatory, libelous, implicitly or explicitly offensive, vulgar, obscene, threatening, abusive, hateful, racist, discriminatory, of a menacing character or likely to cause annoyance, inconvenience, embarrassment, anxiety or could cause harassment to any person or include any links to pornographic, indecent or sexually explicit material of any kind, as determined by Labour xchange’s discretion.

    Violations of system or network security may result in civil and/or criminal liability. Labour xchange will investigate occurrences which may involve such violations and may involve, and cooperate with, law enforcement authorities in prosecuting Users who are involved in such violations.

    1. Additional Terms Applicable to Companies.

    (a) employment status

    All Workers found on the Labour xchange platform are individuals looking to work additional hours gaining additional income on a self-employed basis. The motivation for Workers to look for additional work varies however each one is considered self-employed.

    (b) standard employment rights

    As self-employed individuals, the Workers do not have employment rights such as:

    • Holiday pay entitlement paid by The Company
    • Sick pay entitlement paid by The Company
    • Requirement for pension entitlement paid by The Company

    To compensate Workers for any lost rights associated with self-employed status all Workers receive a minimum fee of £10 per hour. Other than the Worker fee and the Labour xchange administration fee no other costs are incurred by you.

    (c) health and safety

    Although the Workers do not have employment rights you are required to provide a safe environment for them in line with HSE guidelines on contractors.

    Should the environment/role be unsafe, the Worker has the right to refuse to work. Should this happen no fees are refundable. The Worker in addition to rating your Company poorly can file a complaint with Labour xchange, which should it be upheld Labour xchange reserve the right to permanently prohibit You from using the platform.

    For guidance on a what is deemed a safe role/environment please visit the HSE website.

    (d) respect and dignity

    All Workers although self-employed have the right to be treated with respect and dignity. Should you:

    • Harass the Worker
    • Abuse the Worker (verbally or physically)
    • Discriminate the Worker on any grounds (including but not limited to race, gender, sexuality, religion, age)

    The Worker has the right to refuse not to work. Should this happen no fees are refundable. The Worker in addition to rating your Company poorly can file a complaint with Labour xchange, which should it be upheld Labour xchange reserve the right to permanently bar you from using the platform.

    (e) Illegal activity

    Should the Worker be asked to carry out any activity which could be classified illegal they have the right to refuse to work. Should this happen no fees are refundable. The Worker in addition to rating your Company poorly can file a complaint with Labour xchange, which should it be upheld Labour xchange reserve the right to permanently bar you from using the platform.

    In addition, Labour xchange will pass any illegal activities noted on to law enforcement agencies.

     (f) employment selection

    Companies are solely responsible for screening all Workers via their workface profile. Labour xchange shall not be responsible for any employment decisions or issues resulting from.

    All Workers are considered self-employed and although Labour xchange facilitates their payment from you they are not and have not been employees of Labour xchange. As such Labour xchange neither recommends any Worker nor guarantees their abilities.

    The star rating system is provided as a tool to assess each Worker’s suitability; the rating is calculated from their previous placement feedback and other factors which you can see here.  A strong star rating does not guarantee a suitable Worker and should be used for guidance purposes only.

    Labour xchange accepts no liability for any damage or loss resulting from any Worker.

    (g) eligibility to work in the UK

    As part of the sign up process all Worker must upload documentation that demonstrates their right to work in the UK. If you are able to book a Worker, Labour xchange will have already received such uploaded documentation.

    As the UK law states companies, must see an original copy of eligibility documentation the Worker must bring the original copy of the document to your booking. It is then your responsibility to check the original document and be satisfied of their eligibility to work before they start any actual work. Should a Worker fail to bring their original documentation you must refuse to let them work otherwise you will be in breach of UK law. Should a Worker be refused work for failing to supply documentation a full refund will be issued.

    Although Labour xchange makes every effort to ensure all registered Workers are legally allowed to work in the UK, ultimately as their direct contractor this is your responsibility and Labour xchange accepts no liability for loss/damage arising from failure in this field.

    1. H) data protection act

    (h) payment terms

    The Workers fee and Labour xchange administration fee are taken in advance as part of the booking process. On your behalf Labour xchange will transmit the Worker fee upon booking completion.

    These fees may be refunded in full or part as per;

    (g)the worker not being able to prove eligibility to work in the UK,

    (i) booking amendment policy,

    (j) cancellation policy,

    (k) disputes policy.

    (i) booking amendment policy

    If for any reason you should need to amend a booking the following terms apply;

    We will notify the Worker of your change of booking request. Should they be able to accommodate the request you will be notified and the booking will proceed as normal. Should the Worker be unable to accommodate the request we will search for other Workers and begin the booking process from start. Should a suitable replacement be confirmed the booking will proceed as normal, should a suitable replacement not be sourced the booking will be deemed cancelled (as such cancellation terms apply).

    (j) booking cancellation policy

    Should the Worker cancel the agreed booking Labour xchange will initiate the booking process from start to identify a possible replacement. Should there not be a suitable replacement a full refund of all fees will be made.

    Should you need to cancel the booking for any reason:

    Bookings with Over 24 hours until scheduled to start (i)

    All fees will be refunded, however, an administration fee of £5 per day will be imposed which will be deducted from the refunded sums.

    Bookings with Under 24 hours until scheduled to start (ii)

    50% of the Worker’s fee will be refunded and an administration fee of £5 per day will be imposed which will be deducted from the refunded sums.

    Bookings with Under 12 hours until scheduled to start (iii)

    No refund can be issued

     

    (j) disputes policy

    Should the booking commence the Worker will receive their fee in all but the following circumstance:

    • The Worker fails to turn up for work within 15 minutes of the agreed start time. Should this happen you will need to report this immediately via the Company’s portal. If/when verified a full refund will be issued. Should there be an unreasonable delay in reporting this via the portal a refund may not be issued.
    • The Worker fails to provide original documentation proving eligibility to work in the UK. Should this happen you will need to report this immediately via the Company’s portal. If/when verified a full refund will be issued. Should there be an unreasonable delay in reporting this via the portal a refund may not be issued.
    • The Worker is unable to carry out the required duties safely due to being intoxicated or through similar incapacity. Should this happen you will need to report this immediately via the Company’s portal. If/when verified a full refund will be issued. Should there be an unreasonable delay in reporting this via the portal a refund may not be issued.
    • The Worker acts in way which endangers themselves or others or property. Should this happen you will need to report this immediately via the Company’s portal If/when verified a full refund will be issued. Should there be an unreasonable delay in reporting this via the portal a refund may not be issued.
    • Although other disputes will not routinely be considered we you can report issues for review. Should this happen you will need to report this immediately via the Company’s portal. If/when verified a full refund will be issued. Should there be an unreasonable delay in reporting this via the portal a refund may not be issued.

    (k) excluded activity

     

    Company are not allowed to use the Labour xchange system for the following:

    (a) jobs that include any screening requirement or criterion about a job where such requirement or criterion is not an actual and legal requirement of the posted job;

    (b) with respect to Profiles, determine a consumer\\'s eligibility for: (i) credit or insurance for person, family, or household purposes; (ii) employment; or (iii) a government license of benefit.

    (c) sell, promote or advertise products or services;

    (g) post any franchise, pyramid scheme, \\\"club membership\\\", distributorship, multi-level marketing opportunity, or sales representative agency arrangement;

    (h) post any business opportunity that requires an upfront or periodic payment or requires recruitment of other members, sub-distributors or sub-agents;

    (i) post any business opportunity that pays commission only.

    (j) promote any opportunity that does not represent bona fide employment.

    (k) recruit on Labour xchange Site for modeling, acting, talent or entertainment agencies or talent scouting positions;

    (l) advertise sexual services or seek employees for jobs of a sexual nature;

    (m) request the use of human body parts or the donation of human parts, including, without limitation, reproductive services such as egg donation and surrogacy;

    (n) endorse a political party, political agenda, political position or issue;

    (o) promote a religion;

    (p) post jobs located in countries subject to economic sanctions of the UK Government

    (q) except where allowed by applicable law, post jobs which require the applicant to provide information relating to his/her (i) racial or ethnic origin (ii) political beliefs (iii) philosophical or religious beliefs (iv) membership of a trade union (v) physical or mental health (vi) sexual life (vii) the commission of criminal offences or proceedings or (vii) age.

    Labour xchange reserves the right to remove any Company from any Labour xchange Site, which in the reasonable exercise of Labour xchange’s discretion, does not comply with the above Terms, or if any content is posted that Labour xchange believes is not in the best interest of Labour xchange.

    If at any time during Your use of the Labour xchange Services, you made a misrepresentation of fact to Labour xchange or otherwise misled Labour xchange in regard to the nature of Your business activities, Labour xchange will have grounds to terminate Your use of the Labour xchange Services.

    (l) Worker booking frequency

    Labour xchange is a platform that enables Companies to find ad-hoc additional staff when required, as the systems is based around impartial calculated algorithms Workers provided are at chance and can be categorically deemed as self-employed.

    Should a Company consistently book the same Worker Labour xchange will refuse the booking request, as the Worker could be deemed to be an employee due to the consistent nature of employment. For the avoidance of doubt Labour xchange considers the following “consistent booking”

    • In a period of six months the same worker booked for more than two two weeks periods
    • The same Worker booked on more than twelve separate occasions over a 6-month period.

    The Company has the opportunity however to employee the Worker directly, see permanent recruitment.

    (m) Permanent recruitment

    Following a booking should the Company feel a Worker is suited for more regular employment they have the option to offer the Worker a permeant position. Accessed through the Company’s portal an offer of permeant employment can be made.

    Although Labour xchange will communicate the permanent offer to the Worker it can neither guarantee, acceptance nor provide feedback on refusal.

    Should a Worker accept the permanent offer of employment a £100 administration fee becomes due to Labour xchange. This fee is fully refundable should the Worker fail to start the permanent recruitment.

    As part of the administration fee Labour xchange will provide an “Companies pack” with advice and guidance on employing staff.

    Should the Company permanently hire a Worker book through Labour xchange and fail to notify Labour xchange and/or pay the administration fee a penalty fee of £750 becomes due immediately to cover Labour xchange losses.

    .

    (n) hiring staff temporarily outside Labour xchange

    Should a Company attempt to hire a Worker previously booked through Labour xchange outside the Labour xchange platform a £750 penalty fee will become immediately due to cover Labour xchange losses.

     

    1. Additional terms applicable to Workers.

    (a) employment status

    By agreeing to the Labour xchange Terms and conditions you are confirming that all work offered by companies through the Labour xchange platform is on a self-employed basis. Neither the Company nor Labour xchange is your Company, rather you are contracting your services directly to the Company using Labour xchange as means to acquire business.

    As a self-employed Worker, you are responsible for the payment of your own tax and you do not receive the following benefits associated with employment:

    • Holiday pay
    • Sick pay
    • Employment rights

    To compensate you for any losses associated with self-employment all companies will pay a minimum of £10 per hour.

    For support and help regarding self-employment please visit the Community TU support site.

    (b) health and safety

    As a self-employed Worker, you must be aware of your health and safety obligations, please visit the Community TU support site for more details.

    The Company employing you must however provide a safe environment and role for you. If you believe the environment/role to be unsafe, concerns must be addressed to the Company in the first instance. However ultimately you should never work in an unsafe environment/role and will not be penalised for refusing to do so.

    (c) payment terms

    Once you have confirmed the ability to attend an offered booking Labour xchange will take the payment from the Company in advance for your fees. These will be held by Labour xchange until the booking has been completed. Payment will then be made to your bank account within 24hrs of booking completion on behalf of the Company.

    In all but the following circumstances you will receive the agreed fee:

    • You fail to attend the offered booking
    • You fail to bring original eligibility to work documentation to the offered booking
    • You attend the offered booking whilst intoxicated or otherwise incapacitated
    • You act in manor with threatens yours, others or property safety.

    In all cases we will notify you of the issued dispute from the Company and note your comments.

    (d) cancellation policy

    Should you fail to attend a booking without notifying Labour xchange your star rating will be immediately taken to zero.

    Should you cancel a booking on more than three occasions with less than 12 hours’ notice your star rating will be immediately taken to zero.

    Should a Company cancel your booking with less than 24hours notice you will still receive 50% of your agreed fee. Should a Company cancel your booking with less than 12 hours’ notice you will receive your entire fee.

    In circumstances of cancelation we will notify you via the agreed communication method.

    (e) Workface profile creation

    When You register with any Labour xchange Site, you will be asked to create an account and provide Labour xchange with certain information including, without limitation, a valid email address (Your \\\"Workface profile\\\").

    Any Profile You submit must be accurate and describe You, an individual person.

    You acknowledge and agree that You are solely responsible for the form, content and accuracy of any Profile or material contained therein placed by You on the Labour xchange Sites.

    You understand and acknowledge that You have no ownership rights in Your account and that if You cancel Your Labour xchange account or Your Labour xchange account is terminated, all Your account information from Labour xchange, including ratings, Profiles, and work history will be marked as deleted in and may be deleted from Labour xchange\\'s databases and will be removed from any public area of the Labour xchange Sites. Information may continue to be available for some period of time because of delays in propagating such deletion through Labour xchange’s web servers.

    Labour xchange reserves the right to delete Your account and all Your Information after a significant duration of inactivity.

    (e) Workface profile maintenance

    You agree to keep you your workface updated and in good order. You also agree to keep your availability updated which will in turn ensure you are only contacted regarding relevant opportunities.

    All information on the workface profile must be honest and relevant. Videos should follow the script provided to ensure necessary information is included. Videos are not permitted to contain:

    • Offensive language
    • Religious, racist, sexist, or other discriminatory comments
    • Lewd of offensive visuals

    Labour xchange maintains the absolute right to refuse publication or deletion of any video it deems inappropriate.

    (g) eligibility to work in the UK

    All Workers who register with Labour xchange must be eligible to work in the UK. If you are not eligible to work in the UK, you are not permitted to use the Labour xchange system.

    Before your profile can go live Labour xchange requires all Workers to upload proof of eligibility work documents. A list of accepted documents can be found here. Labour xchange cannot activate a Worker’s profile without the required upload in any circumstances.

    As part of UK law, a Company must see the original proof of eligibility document. Therefore, when attending any booking you must take the original document to show to the Company. Should you fail to take the original documents to any booking you will not be allowed to work and sent home without any fee.

    Labour xchange accepts no liability for lost fees should a Worker fail to bring the original document to a booking.

    (h) booking frequency

    Should a Company continuously try to book you in an extended period Labour xchange will stop the Company from booking you. Labour xchange will instead suggest the Company offers you a permeant contract.

    This is to protect all Workers from companies which are attempting to avoid employment rights associated with continued work.

    (i) permanent recruitment

    There may be occasions where a Company may be interested in offering you a permanent contract following a booking through Labour xchange. We will notify you via the Worker portal should such an offer be made. The acceptance of any offer is entirely at your discretion and should be considered carefully.

    As starting permanent employment can incur additional costs for Workers Labour xchange will contribute to Worker’s success by:

    • Making a discretionary payment of £15 to the Worker once they start their permanent role
    • Making a discretionary payment of £15 to the Worker once they have been employed for 1 month.

    All payment is entirely discretionary and at the decision of the Labour xchange management. These payments are to enable the smooth transition for Workers into a new role as Labour xchange is committed to Worker welfare.

    All offers of permanent employment must be made through the Labour xchange system, should a Company approach you directly please report this via the Worker’s portal.

    (i) self-employed support from community TU

    As a Labour xchange member you have automatically been opted in to receive access to a support site from Community trade union. The support site is providing free of charge and entirely at the direction of community trade union.

    You can opt out of the support site during sign up

    Labour xchange has no control over the Community support site and therefore accepts no liability regarding any loss as result of site failure or advice given. When accessing the Community TU support site, you are agreeing to the entire terms of use which can be found here

     

    1. User Content and Submissions.

    You understand that all information, data, text, software, music, sound, photographs, graphics, video, advertisements, messages or other materials submitted, posted or displayed by You on or through a Labour xchange Site (\\\"User Content\\\") is the sole responsibility of the person from which such User Content originated. Labour xchange claims no ownership or control over any User Content. You or a third party licensor, as appropriate, retain all patent, trademark and copyright to any User Content you submit, post or display on or through Labour xchange and you are responsible for protecting those rights, as appropriate. By submitting, posting or displaying User Content on or through Labour xchange, you grant Labour xchange a worldwide, non-exclusive, royalty-free, transferable, sub-licensable license to use, reproduce, adapt, distribute and publish such User Content through Labour xchange. In addition, by submitting, posting or displaying User Content which is intended to be available to the general public, you grant Labour xchange a worldwide, non-exclusive, royalty-free license to reproduce, adapt, distribute and publish such User Content for the purpose of promoting Labour xchange and its services. Labour xchange will discontinue this licensed use within a commercially reasonable period after such User Content is removed from Labour xchange. Labour xchange reserves the right to refuse to accept, post, display or transmit any User Content in its sole discretion.

    You also represent and warrant that You have the right to grant, or that the holder of any rights, including moral rights in such content has completely and effectively waived all such rights and validly and irrevocably granted to You the right to grant, the license stated above. If You post User Content in any public area of any Labour xchange Site, you also permit any User to access, display, view, store and reproduce such User Content for personal use. Subject to the foregoing, the owner of such User Content placed on any Labour xchange Site retains any and all rights that may exist in such User Content. Labour xchange may review and remove any User Content that, in its sole judgment, violates these Terms, violates applicable laws, rules or regulations, is abusive, disruptive, offensive or illegal, or violates the rights of, or harms or threatens the safety of, Users of any Labour xchange Site. Labour xchange reserves the right to expel Users and prevent their further access to the Labour xchange Sites and/or use of Labour xchange Services for violating the Terms or applicable laws, rules or regulations. Labour xchange may take any action with respect to User Content that it deems necessary or appropriate in its sole discretion if it believes that such User Content could create liability for Labour xchange, damage Labour xchange’s brand or public image, or cause Labour xchange to lose Users or (in whole or in part) the services of its ISPs or other suppliers.

    Labour xchange does not represent or guarantee the truthfulness, accuracy, or reliability of User Content, derivative works from User Content, or any other communications posted by Users nor does Labour xchange endorse any opinions expressed by Users. You acknowledge that any reliance on material posted by other Users will be at Your own risk.

    The following is a partial list of User Content that is prohibited on the Application. The list below is for illustration only and is not a complete list of all prohibited User Content.

    Content that:

    • is implicitly or explicitly offensive, such as User Content that engages in, endorses or promotes racism, bigotry, discrimination, hatred or physical harm of any kind against any group or individual;
    • harasses, incites harassment or advocates harassment of any group or individual;
    • involves the transmission of “junk mail”, “chain letters,” or unsolicited mass mailing, “spamming” or “phishing”;
    • promotes or endorses false or misleading information or illegal activities or conduct that is abusive, threatening, obscene, defamatory or libelous;
    • promotes or endorses an illegal or unauthorized copy of another person\\'s copyrighted work, such as providing or making available pirated computer programs or links to them, providing or making available information to circumvent manufacture-installed copy-protect devices, or providing or making available pirated music or other media or links to pirated music or other media files;
    • contains restricted or password only access pages, or hidden pages or images;
    • displays or links to pornographic, indecent or sexually explicit material of any kind;
    • provides or links to material that exploits people under the age of 18 in a sexual, violent or other manner, or solicits personal information from anyone under 18; or
    • provides instructional information about illegal activities or other activities prohibited by these Terms, including without limitation, making or buying illegal weapons, violating someone\\'s privacy, providing or creating computer viruses or pirating any media; and
    • solicits passwords or personal identifying information from other Users.

    Any Profile You submit must describe You, an individual person. Examples of inappropriate and prohibited Profiles include, but are not limited to, Profiles that purport to represent an animal, place, inanimate object, fictional character, or real individual that is not You.

    You may not include, in any User Content submitted to Labour xchange Networking, information that may be interpreted as a direct solicitation, advertisement or recruitment for an available job position directed to individuals seeking employment on either a full time or part time basis. In order to protect our Labour xchange Community Users from commercial advertising or solicitation, Labour xchange reserves the right to restrict the number of e-mails or other messages which a User may send to other Users to a number which Labour xchange deems appropriate in its sole discretion.

    Profiles derived from User Content may also be made available through the Labour xchange Sites. Labour xchange does not make any representations regarding the accuracy or validity of such derived works or their appropriateness for evaluation by Companies. Derived Profiles may differ significantly from User Content.

    We appreciate hearing from our Users and welcome Your comments regarding our services and the Labour xchange Sites. Please be advised, however, that our policy does not permit us to accept or consider creative ideas, suggestions, inventions or materials other than those which we have specifically requested. While we do value Your feedback on our services, please be specific in Your comments regarding our services and do not submit creative ideas, inventions, suggestions, or materials. If, despite our request, you send us creative suggestions, ideas, drawings, concepts, inventions, or other information (collectively the \\\"Submission\\\"), the Submission shall be the property of Labour xchange. None of the Submission shall be subject to any obligation of confidentiality on our part and we shall not be liable for any use or disclosure of any Submission. Labour xchange shall own exclusively all now known or later discovered rights to the Submission and shall be entitled to unrestricted use of the Submission for any purpose whatsoever, commercial or otherwise, without compensation to You or any other person.

    1. Identification of Agent to Receive Notification and Elements of Notification of Claimed Copyright or Trademark Infringement.

    If You believe that Your copyrighted work or trademark has been uploaded, posted or copied to any Labour xchange Site and is accessible on such Labour xchange Site in a way that constitutes copyright or trademark infringement, please contact Labour xchange by email at

    1. Policy Regarding Termination of Users Who Infringe the Copyright or Other Intellectual Property Rights of Others.

    Labour xchange respects the intellectual property of others, and we ask our Users and content partners to do the same. The unauthorized posting, reproduction, copying, distribution, modification, public display or public performance of copyrighted works constitutes infringement of the copyright owners rights. As a condition to Your use of the Labour xchange Sites, you agree not to use any Labour xchange Site to infringe the intellectual property rights of others in any way. Labour xchange reserves the right to terminate the accounts of any Users, and block access to the Labour xchange Sites of any Users who are repeat infringers of the copyrights, or other intellectual property rights, of others. Labour xchange reserves the right, in its sole discretion, to take these actions to limit access to the Site and/or terminate the accounts of any time, in our sole discretion Users who infringe any intellectual property rights of others, whether or not there is any repeat infringement, with or without notice, and without any liability to the User who is terminated or to the User whose access is blocked. Notwithstanding the foregoing, in the event that You believe in good faith that a notice of copyright infringement has been wrongly filed against You, please contact Labour xchange as set forth in Section 6 above.

    1. Labour xchange\\'s Liability.

    The Labour xchange Sites act as, among other things, venues for (i) Companies to search for and evaluate job Workers and (ii) Workers to produce workface Profiles and detail their availability. Labour xchange does not screen or censor the listings, including Profiles offered. Labour xchange is not involved in, and does not control, the actual transaction between Companies and Workers other than transmitting payment. As a result, Labour xchange is not responsible for User Content, the quality, safety or legality of the jobs or resumes posted, the truth or accuracy of the listings, the ability of Companies to offer job opportunities to Workers or the ability of Workers to fill job openings and Labour xchange makes no representations about any jobs, profiles or User Content on the Labour xchange Sites. While Labour xchange reserves the right in its sole discretion to remove User Content, profiles or other material from the Labour xchange Sites from time to time, Labour xchange does not assume any obligation to do so and to the extent permitted by law, disclaims any liability for failing to take any such action.

    Note that there are risks, including but not limited to the risk of physical harm, of dealing with strangers, underage persons or people acting under false pretenses. You assume all risks associated with dealing with other users with whom You come in contact through the Labour xchange Sites. By its very nature other people’s information may be offensive, harmful or inaccurate, and in some cases will be mislabeled or deceptively labeled. We expect that You will use caution and common sense when using the Labour xchange Sites.

    Because User authentication on the Internet is difficult, Labour xchange cannot and does not confirm that each User is who they claim to be. Because we do not and cannot be involved in User-to-User dealings or control the behavior of participants on any Labour xchange Site, in the event that You have a dispute with one or more Users, You release Labour xchange (and our agents and employees) from claims, demands and damages (actual and consequential and direct and indirect) of every kind and nature, known and unknown, suspected and unsuspected, disclosed and undisclosed, arising out of or in any way connected with such disputes to the fullest extent permitted by law.

    The Labour xchange Sites and the Labour xchange Content may contain inaccuracies or typographical errors. Labour xchange makes no representations about the accuracy, reliability, completeness, or timeliness of any Labour xchange Site or the Labour xchange Content. The use of all Labour xchange Sites and the Labour xchange Content is at Your own risk. Changes are periodically made to Labour xchange Sites and may be made at any time. Labour xchange cannot guarantee and does not promise any specific results from use of any Labour xchange Site. No advice or information, whether oral or written, obtained by a User from Labour xchange or through or from any Labour xchange Site shall create any warranty not expressly stated herein.

    Labour xchange encourages You to keep a back-up copy of any of Your User Content. To the extent permitted by law, in no event shall Labour xchange be liable for the deletion, loss, or unauthorized modification of any User Content.

    If You believe that something on the Site violates these Terms, please contact our designated agent set forth in Section 6 above.

    If notified of any content or other materials which allegedly do not conform to these Terms, Labour xchange may in its sole discretion investigate the allegation and determine whether to remove or request the removal of the content. Labour xchange has no liability or responsibility to Users for performance or nonperformance of such activities.

    1. Disclaimer of Warranty.

    TO THE FULLEST EXTENT POSSIBLE BY LAW, LABOUR XCHANGE DOES NOT WARRANT THAT ANY LABOUR XCHANGE SITE OR ANY LABOUR XCHANGE SERVICES WILL OPERATE ERROR-FREE OR THAT ANY LABOUR XCHANGE SITE AND ITS SERVERS ARE FREE OF COMPUTER VIRUSES OR OTHER HARMFUL MECHANISMS. IF YOUR USE OF ANY LABOUR XCHANGE SITE OR THE LABOUR XCHANGE CONTENT RESULTS IN THE NEED FOR SERVICING OR REPLACING EQUIPMENT OR DATA OR ANY OTHER COSTS, LABOUR XCHANGE IS NOT RESPONSIBLE FOR THOSE COSTS. THE LABOUR XCHANGE SITES AND LABOUR XCHANGE CONTENT ARE PROVIDED ON AN \\\"AS IS\\\" BASIS WITHOUT ANY WARRANTIES OF ANY KIND. LABOUR XCHANGE, TO THE FULLEST EXTENT PERMITTED BY LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTY OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE AND NON-INFRINGEMENT. LABOUR XCHANGE MAKES NO WARRANTIES ABOUT THE ACCURACY, RELIABILITY, COMPLETENESS, OR TIMELINESS OF THE LABOUR XCHANGE CONTENT, SERVICES, SOFTWARE, TEXT, GRAPHICS, AND LINKS.

    1. Disclaimer of Consequential Damages.

    TO THE FULLEST EXTENT POSSIBLE BY LAW, IN NO EVENT SHALL LABOUR XCHANGE, ITS SUPPLIERS, OR ANY THIRD PARTIES MENTIONED ON ANY LABOUR XCHANGE SITE BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, INCIDENTAL AND CONSEQUENTIAL DAMAGES, LOST PROFITS, OR DAMAGES RESULTING FROM LOST DATA, LOST EMPLOYMENT OPPORTUNITY OR BUSINESS INTERRUPTION) RESULTING FROM THE USE OR INABILITY TO USE ANY LABOUR XCHANGE SITE AND THE LABOUR XCHANGE CONTENT, WHETHER BASED ON WARRANTY, CONTRACT, TORT, OR ANY OTHER LEGAL THEORY, AND WHETHER OR NOT LABOUR XCHANGE IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    1. Limitation of Liability.

    TO THE FULLEST EXTENT POSSIBLE BY LAW, LABOUR XCHANGE\\'S MAXIMUM LIABILITY ARISING OUT OF OR IN CONNECTION WITH ANY LABOUR XCHANGE SITE OR YOUR USE OF THE LABOUR XCHANGE CONTENT, REGARDLESS OF THE CAUSE OF ACTION (WHETHER IN CONTRACT, TORT, BREACH OF WARRANTY OR OTHERWISE), WILL NOT EXCEED £100.

    1. Links to Other Sites.

    The Labour xchange Sites contain links to third party Web sites. These links are provided solely as a convenience to You and not as an endorsement by Labour xchange of the contents on such third-party Web sites. Labour xchange is not responsible for the content of linked third-party sites and does not make any representations regarding the content or accuracy of materials on such third party Web sites. If You decide to access linked third-party Web sites, you do so at Your own risk.

    1. No Resale or Unauthorized Commercial Use.

    You agree not to resell or assign Your rights or obligations under these Terms. You also agree not to make any unauthorised commercial use of any Labour xchange Site.

    1. Indemnity.

    You agree to defend, indemnify, and hold harmless Labour xchange, its affiliates, and their respective officers, directors, employees and agents, from and against any claims, actions or demands, including without limitation reasonable legal and accounting fees, alleging or resulting from (i) any User Content or other material You provide to any Labour xchange Site, (ii) Your use of any Labour xchange Content, or (iii) Your breach of these Terms. Labour xchange shall provide notice to You promptly of any such claim, suit, or proceeding.

    1. General.

    Labour xchange makes no claims or representations that the Labour xchange Content may be lawfully viewed or accessed outside of the United Kingdom. Access to the Labour xchange Content may not be legal by certain persons or in certain countries. If You access any Labour xchange Site You do so at Your own risk and are responsible for compliance with the laws of Your jurisdiction.

    These Terms are governed by the laws of England and Wales, without respect to its conflict of laws principles. Jurisdiction for any claims arising under this agreement shall lie exclusively within England and Wales. If any provision of these Terms are found to be invalid by any court having competent jurisdiction, the invalidity of such provision shall not affect the validity of the remaining provisions of these Terms, which shall remain in full force and effect. No waiver of any term of these Terms shall be deemed a further or continuing waiver of such term or any other term. In addition, Labour xchange’s failure to enforce any term of these Terms shall not be deemed as a waiver of such term or otherwise affect Labour xchange’s ability to enforce such term at any point in the future. Except as expressly provided in an additional agreement, additional Terms for certain areas of the Labour xchange Sites, a particular \\\"Legal Notice,\\\" or software license or material on particular pages on the Labour xchange Sites, these Terms constitute the entire agreement between You and Labour xchange with respect to the use of the Labour xchange Sites. No changes to these Terms shall be made except by a revised posting on this page.

    1. Mobile Services.

    If You use the Labour xchange Sites through a mobile device, you agree that information about Your use of the Labour xchange Sites through Your mobile device and carrier may be communicated to us, including but not limited to Your mobile carrier, Your mobile device, or Your physical location. In addition, use of the Labour xchange Sites through a mobile device may cause data to be displayed on and through Your mobile device. By accessing the Labour xchange Sites using a mobile device, you represent that to the extent You import any of Your Labour xchange data to Your mobile device that You have authority to share the transferred data with Your mobile carrier or other access provider. In the event You change or deactivate Your mobile account, you must promptly update Your Labour xchange account information to ensure that Your messages are not sent to the person that acquires Your old number and failure to do so is Your responsibility. You acknowledge You are responsible for all charges and necessary permissions related to accessing the Labour xchange Sites through Your mobile access provider. Therefore, you should check with Your provider to find out if the Labour xchange Sites are available and the terms for these services for Your specific mobile devices.

    By using any downloadable application to enable Your use of the Labour xchange Sites, you are explicitly confirming Your acceptance of the terms of the End User License Agreement associated with the Application provided at download or installation, or as may be updated from time to time.

    1. Term and Termination.

    These Terms will remain in full force and effect while You are a User of any Labour xchange Site. Labour xchange reserves the right, at its sole discretion, to pursue all of its legal remedies, including but not limited to removal of Your User Content from the Labour xchange Sites and immediate termination of Your registration with or ability to access the Labour xchange Sites and/or any other services provided to You by Labour xchange, upon any breach by You of these Terms or if Labour xchange is unable to verify or authenticate any information You submit to a Labour xchange Site registration. Even after You are no longer a User of the Labour xchange Sites, certain provisions of these Terms will remain in effect, including Sections 1, 2, 5, 7 through 16, inclusive.

     

    \");\n$templateCache.put(\"app/corporate/cant-be-pigeonholed/cant-be-pigeonholed.html\",\"

    The best way to gain a competitive advantage

    We could talk about Labour xchange’s unique technology, our ethical approach or the fact we are endorsed by a TUC affiliated union. We could even mention how we receive weekly fan mail as people love out platform.

    But the number one rule of sales is to talk about the benefit for the customer and simply put our approach and technology means you can access more people, who specifically want to work the hours you need working. And this would which gives you a significant advantage over your competition.

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    Fully integrated staffing solution

    We integrate the labour xchange platform with your scheduling software so individuals can be booked automatically when a staffing gap appears.

    As everyone has already confirmed their availability people can be booked and on premises in under an hour.

    The right people at the right time.

    Whatever your industry, we have learnt the most important aspect of any business is its people and its ability to deal with changes in demand and/or staff sickness/holidays. We know our new and ethical approach provides access to people that no other recruitment method can.

    We work in a variety of sectors and have developed technology that enables us to swiftly adapt to specific industries so why not see if we can help you?

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/care/care.html\",\"

    The ethical on demand staffing solution

    Get access to thousands of people local to your operations

    Ability to book staff within one hour

    Be the good guys, our ethical approach means you will be doing the right thing

    Lower costs than any agency

    A true win win

    There are over 7 million people in the UK who cannot work enough hours as they cannot find work opportunities that fit around current commitments. Individuals such as the underemployed, parents and carers.

    Labour xchange enable your organisation to utilise these people\\'s free time, so you get the best staff as required and these hardworking people get additional income that fits around their life.

    Find out more

    Fully integrated staffing solution

    We integrate the labour xchange platform with your scheduling software so individuals can be booked automatically when a staffing gap appears.

    As everyone has already confirmed their availability people can be booked and on premises in under an hour.

    Endorsed and backed by trade unions

    As our approach is radically different we create a win for you and the worker. This ethical model is endorsed and backed by our friends at Community trade union, which means yes you could be the good guys and get the staff you need.

    Our cutting edge technology and automated process gives us a substantially lower cost base, which we pass on to you in the form of reduced fees and then to the workers in the form of higher hourly rates.

    Did we mention you could be the good guys?

    We are also backed by charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/facilities-management/facilities-management.html\",\"

    Putting the polish on your operations

    Covering holidays, sickness and new business in the current employment market is almost impossible for most operations. There just isn’t the people interested in working a few hours every now and then!

    What if you knew there are plenty of people who want to cover your operations only you have been looking in the wrong place. Labour xchange works with people excluded from the employment market and can access more people than any other recruitment source.

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    Happy people makes for better work and loyal customers

    Our approach is simple, by starting with people and asking them when they want to work we can ensure you can access people who genuinely want to work the hours you need working. Happy people, higher productivity and a socially responsible approach, what\\'s not to love?

    The right people in the right place

    Unlike other platforms we have used technology to fully automate our processes, which ensures at a touch of button you can book the staff you need to cover sickness, holidays or additional demand.

    Furthermore, our technological approach ensures we are extremely cost efficient, the benefits of which are passed on to the worker in the form of higher rates and lower costs to you.

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/final-mile-delivery/final-mile-delivery.html\",\"

    We reach the people you can’t

    We know that there are only so many people who want to carry out final mile delivery work, and it is becoming increasingly difficult to attract these people, right?

    Our technological solution targets and attracts people excluded by all other recruitment process and platforms. By working with Labour xchange you can access staff that no one else can!

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    A square peg for a square hole

    Our approach is simple, by starting with people and asking them when they want to work we can ensure you can access people who genuinely want to work the hours you need working.

    Happy people, higher productivity and a socially responsible approach, what\\'s not to love?

    Responsive, responsible and reasonable

    Unlike other platforms we have used to technology to fully automate our processes which ensures, at a touch of button, you can book the staff you need to carryout delivery\\'s.

    Our technological approach ensures we are extremely cost efficient which is passed on to the worker in the form of higher rates and lower costs to you.

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/hospitality/hospitality.html\",\"

    Friday and Saturday 6pm to 10pm

    For almost every hospitality business the demand peaks at a few hours each and every week. The challenge is in ensuring that there are sufficient staffing to deal with the demand at peak times, especially when there are not enough people who want to work during these busy times.

    Labour xchange work with people who specifically want those few extra hours each week; people who are perfectly suited for your busy periods!

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    We do something different so you don’t have too!

    Our approach is simple, by starting with people and asking them when they want to work we can ensure you can access people who genuinely want to work the hours you need working.

    Happy people, higher productivity and a socially responsible approach, what\\'s not to love?

    The right people at the right time.

    Unlike other platforms we have used to technology to enable people to list the exact hours they want to work, which means at a touch of button you can get the staff you need for those peak times.

    Our technological approach ensures we are extremely cost efficient the benefits of which are passed on to the worker in the form of higher rates and lower costs to you.

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/warehouse/warehouse.html\",\"

    The difference is people!

    One person can make the difference between getting a lorry out on time or not. So how do you make sure you have adequate cover to keep your operations motoring especially when the local workforce is limited?

    Labour xchange work with people who are shut out of the current employment market, so no matter your location we are able to increase the local staffing supply and ensure you have the cover you need!

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    We do something different so you don’t have too!

    Our approach is simple, by starting with people and asking them when they want to work we can ensure you can access people who genuinely want to work the hours you need working.

    Happy people, higher productivity and a socially responsible approach, what\\'s not to love?

    The people are there you just have to know where to look!

    In any given location our technological solution can increase the people available to work by a factor of ten. Additionally our technological approach ensures we are highly cost efficient which is passed on to the worker in the form of higher fees and lower costs to you.

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/corporate/manufacturing/manufacturing.html\",\"

    Keep calm and keep making things

    One person can make the difference between keeping a manufacturing line open or closed. So how do you make sure you have adequate cover to keep all your lines open especially when the local workforce is limited?

    Labour xchange work with people who are shut out of the current employment market, no matter your location we are able to increase the local staffing supply and ensure you have the cover you need!

    A true win win

    There are over 7 million people in the UK who can\\'t work enough hours including the underemployed, parents and carers as they cannot find work that fits around their current commitments.

    Labour xchange enables your business to utilise these people\\'s free time, so you get the best staff when required and these hardworking people get additional income that fits in with life.

    Find out more

    We do something different so you don’t have too!

    Our approach is simple, by starting with people and asking them when they want to work we can ensure you can access people who genuinely want to work the hours you need working.

    Happy people, higher productivity and a socially responsible approach, what\\'s not to love?

    The people are there you just have to know where to look!

    In any given location our technological solution can increase the people available to work by a factor of ten.

    Our technological approach ensures we are extremely cost efficient, the benefits of which are passed on to the worker in the form of higher rates and lower costs to you.

    Did we mention you could be the good guys?

    Community

    We are also backed by a trade union, charities and social organisations who recognise our approach helps people earn extra income in a way that benefits them.

    So by working with Labour xchange not only will you improve your operations but you will be fulfilling your corporate social responsiblity.

    \");\n$templateCache.put(\"app/jobs/partials/job.html\",\"

    {{vm.job.title}}

    Location: {{vm.job.houseNumber}} {{vm.job.town}} {{vm.job.address.county}} {{vm.job.address.country}} {{vm.job.address.postCode}}
    Industry: {{vm.job.industry}}
    Occupational Category: {{vm.job.occupationalCategory}}
    Hours: {{vm.job.employmentType}}, {{vm.job.workHours}}
    Salary: {{vm.job.salaryCurrency}} {{vm.job.baseSalary}}
    Description:
    Hiring Organization:

    {{vm.job.hiringOrganization.name}}

    {{vm.job.hiringOrganization.sameAs}}

    Responsibilities:
    Educational requirements:
    Experience requirements:
    Desired Skills:
    Qualifications:
    Benefits:
    Incentives:
    Date Posted: {{vm.job.creationTime | date:\\'dd-MM-yyyy\\'}}
    ValidThrough: {{vm.job.validThrough | date:\\'dd-MM-yyyy\\'}}
    \");\n$templateCache.put(\"app/jobs/partials/jobs.html\",\"
    0\\\">

    {{job.title}}

    Location: {{job.houseNumber}} {{job.town}} {{job.address.county}} {{job.address.country}} {{job.address.postCode}}
    Industry: {{job.industry}}
    Occupational Category: {{job.occupationalCategory}}
    Hours: {{job.employmentType}}, {{job.workHours}}
    Salary: {{job.salaryCurrency}} {{job.baseSalary}}
    Description:
    Hiring Organization:

    {{job.hiringOrganization.name}}

    {{job.hiringOrganization.sameAs}}

    Responsibilities:
    Educational requirements:
    Experience requirements:
    Desired Skills:
    Qualifications:
    Benefits:
    Incentives:
    Date Posted: {{job.creationTime | date:\\'dd-MM-yyyy\\'}}
    ValidThrough: {{job.validThrough | date:\\'dd-MM-yyyy\\'}}
    \");\n$templateCache.put(\"app/candidate/portal/modal/bookingDetail.html\",\"
     {{vm.booking.clientUser.name}}
     {{vm.booking.clientUser.companyProfile.address.postCode}}
      {{vm.booking.clientUser.companyProfile.address.addressLine}}   {{vm.booking.clientUser.companyProfile.address.houseNumber}}, {{vm.booking.clientUser.companyProfile.address.addressLine}}
     {{workType.name}},
     {{vm.booking.startDate | date:\\'dd/MM/yy\\'}} to {{vm.booking.endDate | date:\\'dd/MM/yy\\'}}  {{vm.booking.startDate | date:\\'dd/MM/yy\\'}}
     {{vm.formatDate(vm.booking.startTime) | date:\\'HH:mm\\'}} to {{vm.formatDate(vm.booking.endTime) | date:\\'HH:mm\\'}}  {{vm.formatDate(vm.booking.startTime) | date:\\'HH:mm\\'}}
     {{vm.booking.clientUser.companyProfile.about}}
    \");\n$templateCache.put(\"app/candidate/portal/modal/bookingsHistory.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/modal/careQualificationsUpload.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/modal/confirmCancel.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/modal/futureBookings.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/modal/reasonRefuse.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/modal/unsuitableForCare.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/partials/addphoto-tooltip-modal.html\",\"\");\n$templateCache.put(\"app/candidate/portal/partials/addvideo-tooltip-modal.html\",\"\");\n$templateCache.put(\"app/candidate/portal/partials/already-to-go.html\",\"

    Your already to go and earn Extra

    Nice one, keep your eye out for a text or email in the next few days that will detail where and when to work.

    \");\n$templateCache.put(\"app/candidate/portal/partials/alternative-documentation.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/partials/availability.html\",\"

    Amend your availability

    -

    The days/times most searched by employers in your area are :

    {{vm.getDateOfWeek(vm.dayTimeMost.dayTime.startTime)}} {{vm.formatDate(vm.dayTimeMost.dayTime.startTime) | date:\\'HH:mm\\'}} - {{vm.formatDate(vm.dayTimeMost.dayTime.endTime) | date:\\'HH:mm\\'}}

    \");\n$templateCache.put(\"app/candidate/portal/partials/become-eligible-for-care.html\",\"

    Lets get started

    The process is quite straightfoward:

    First: We ask you to answer some simple questions

    Second: We ask you to complete an online training package

    Finally: We ask you to confirm your agreement to complete a DBS check, once a job is offered to you.

    Some quick questions

    Are you feel able to support people in their own homes?
    Do you have access to your own transport?
    Are you able to support people to participate in their chosen social activities?
    Are you able to carry out a variety of duties, including but not limited to washing, dressing and domestic tasks?

    (A few more questions) Getting to know and understand you

    I want a job that makes a positive difference to people’s lives.
    I am reliable.
    I am able to stay calm in challenging and emergent situations and help those around me to feel at ease.
    I am a good listener.
    I am a good communicator.
    I can empathise with people.
    I can follow instructions, procedures and policies.
    I am happy to develop my skills and knowledge.

    Prior support experience

    Please use the box below to explain what care and support experience you have.

    Experience for this role can be in many forms and not necessarily paid experience, It might have been experience working in a similar role or with vulnerable adults, experience through a work placement, from your personal life, perhaps caring for family members, through volunteering or as part of a traineeship or apprenticeship.

    Training information

    Care Xchange recognise the importance and benefits of training and learning. For this reason, we formed a partnership with Grey Matter Learning, an award-winning online training provider.

    Through this platform you can access Grey Matter’s E-Learning system, Click, to complete a range of certified training courses to improve your knowledge, skills and confidence.

    Best of all, the training is free of charge and you can undertake training courses at times to suit you, for example the Care Certificate course, which covers the 15 standards for the Care Certificate?

    1. Understand Your Role
    2. Your Personal Development
    3. Duty of Care
    4. Equality & Diversity
    5. Work in a Person Centred Way
    6. Communication
    7. Privacy & Dignity
    8. Fluids & Nutrition
    9. Awareness of Mental Health, Dementia and Learning Disability
    10. Safeguarding Adults
    11. Safeguarding Children
    12. Basic Life Support
    13. Health & Safety
    14. Handling Information
    15. Infection Prevention & Control

    Real life examples of PA work

    Training

    Final Step

    When an individual who needs support for the hours you have listed needs help you will be contacted to arrange a meeting with them.

    If both you and them get along they will offer you a role looking after them for an agreed number of hours per week. Before the role can go live you will need to complete a DBS check (at no cost to you), even if you already have one.

    Can you confirm you will be willing to undertake such a check
    Upload C.V.
    1\\\">
    \");\n$templateCache.put(\"app/candidate/portal/partials/booking-requests.html\",\"

    {{vm.titleRequestBooking}}

    =3}\\\" ng-repeat=\\\"booking in vm.listBookings | limitTo:3\\\">
    Amended

    {{booking.clientUser.companyProfile.businessName}}

     {{booking.clientUser.companyProfile.address.postCode}}
     {{workType.name}},
     {{booking.startDate | date:\\'dd/MM/yy\\'}} to {{booking.endDate | date:\\'dd/MM/yy\\'}}  {{booking.startDate | date:\\'dd/MM/yy\\'}}
     {{vm.formatDate(booking.startTime) | date:\\'HH:mm\\'}} to {{vm.formatDate(booking.endTime) | date:\\'HH:mm\\'}}  {{vm.formatDate(booking.startTime) | date:\\'HH:mm\\'}}
     {{booking.clientUser.companyProfile.about}}

    {{vm.noListBookings}}

    \");\n$templateCache.put(\"app/candidate/portal/partials/bookings-history.html\",\"

    Bookings/Earnings history

    EmployerDateStatus
    {{earningshistory.clientUser.companyProfile.businessName}}{{earningshistory.startDate | date:\\'dd/MM/yy\\'}} - {{earningshistory.endDate | date:\\'dd/MM/yy\\'}} {{earningshistory.startDate | date:\\'dd/MM/yy\\'}}{{vm.bookingStatus(earningshistory.status)}}

    {{vm.noEarningsHistory}}

    Total for current tax year
    {{vm.earningsTotalAmount | currency: \\'£\\'}}

    Upcoming bookings

    EmployerDateStatus
    {{comingbooking.clientUser.companyProfile.businessName}}{{comingbooking.startDate | date:\\'dd/MM/yy\\'}} - {{comingbooking.endDate | date:\\'dd/MM/yy\\'}} {{comingbooking.startDate | date:\\'dd/MM/yy\\'}}{{vm.bookingStatus(comingbooking.status)}}Cancel

    {{vm.noUpcomingHistory}}

    \");\n$templateCache.put(\"app/candidate/portal/partials/cancel-booking.html\",\"

    Cancel this booking?

    {{ vm.cancelBooking.clientUser.companyProfile.businessName}}

    {{ vm.cancelBooking.clientUser.companyProfile.address.postCode}}
     {{workType.name}},
    {{vm.cancelBooking.startDate | date:\\'dd/MM/yy\\'}} to {{vm.cancelBooking.endDate | date:\\'dd/MM/yy\\'}} {{vm.cancelBooking.startDate | date:\\'dd/MM/yy\\'}}
    {{vm.formatDate(vm.cancelBooking.startTime) | date:\\'HH:mm\\'}} to {{vm.formatDate(vm.cancelBooking.endTime) | date:\\'HH:mm\\'}} {{vm.formatDate(vm.cancelBooking.startTime) | date:\\'HH:mm\\'}}
    {{ vm.cancelBooking.clientUser.companyProfile.about}}

    Cancelling bookings can affect your star rating, making it harder to find future work

    \");\n$templateCache.put(\"app/candidate/portal/partials/confirm-cancel-modal.html\",\"
    \");\n$templateCache.put(\"app/candidate/portal/partials/current-star-rating.html\",\"

    Your current star rating is

    This is made up by
    0\\\">
    N/A

    \");\n$templateCache.put(\"app/candidate/portal/partials/employment-record.html\",\"

    Employment Record

    To complete the employment record you need to provide both a copy of your DBS check and a copy of the signed contract

    DBS Check requested {{vm.employmentRecord.DBSCheckRequestDate | date : \\'dd/MM/yyyy\\'}}.

    Upload DBS document

    Contract offer sent date {{vm.employmentRecord.ContractAndOfferSentDate | date : \\'dd/MM/yyyy\\'}}.

    Upload signed contract
    \");\n$templateCache.put(\"app/candidate/portal/partials/employment-support-news.html\",\"

    UNION NEWS

    {{vm.listLandingResponse}}

    1\\\">

    UNION NEWS


    {{item.creationTime | date:\\'dd/MM/yy\\'}}


    {{item.title}}

    \");\n$templateCache.put(\"app/candidate/portal/partials/employment-support.html\",\"
     
    Community
     
     

    Support From Your Union

     
     
     
    \");\n$templateCache.put(\"app/candidate/portal/partials/help-us-to-help-you.html\",\"

    Help us to help you

    To help us to match you to the right roles and provide some career guidance we need to know a little bit more about you.Below are some questions, some made seem odd but they will help us to better understand what might work for you. There are no right or wrong answers as there is the right role for everyone, be honest and have fun.

    What makes a good employer
    What do banks need to improve most
    What are the most important qualities
    What\\'s worse when ordering takeaway delivery
    What are the most important qualities at work
    What makes the best employee
    How would friends / family describe you
    When choosing a film would you prefer to watch
    What\\'s the worst part of a new job
    How often do you get bored
    What\\'s the worst part of cooking dinner
    Are machines better than humans for repetitive tasks
    Please make sure you answer all the questions

    Brilliant, thanks

    Your answers will help us to find you work and suggest career advice and training in the future. We really appreciate your time.

    Thanks for your answers, we believe we have something that will fit your personality and hours you have previously selected.

    \");\n$templateCache.put(\"app/candidate/portal/partials/how-communicate.html\",\"

    How we communicate

    Please select which method you would prefer us to use when communicating with you

    Preference
    Ooops try that again.
    The phone number is not valid
    The phone number is not valid

    Change password

    Password did not match.
    \");\n$templateCache.put(\"app/candidate/portal/partials/insurance-code.html\",\"

    Finally we need to get your insurance sorted

    Even if you have insurance for your vehicle you will need appropriate insurance to carry out deliveries. If you already have the appropriate insurance please upload a picture of the cover document.

    If you do not have such cover do not worry, we recommend that you visit our friends at Zego insurance and arrange cover through them. The good news is that you pay nothing on sign up and you only pay insurance costs for the hours you work, however you will receive compensation for the insurance costs in the form of an increased hourly rate. Once you have signed up please upload a copy of the cover document and we automatically inform Zego to cover you when you are working.

    So whenever you are earning you are also insured, a win win right?

    Upload Insurance
    \");\n$templateCache.put(\"app/candidate/portal/partials/mode-of-transport.html\",\"

    Good news!! We have delivery driving roles in your area for the times you want to work

    The role is delivering food, very locally to you working for Just Eat, all equipment is provided and the commercial insurance costs will also be provided. The rate starts at £10 per hour, all good news so far right!!!

    Please confirm the mode of transport you have to deliver for Just Eat

    Sorry, we really need this.

    We also need a few more details but it shoudn’t take more than five minutes, and it will be totally worth your while

    \");\n$templateCache.put(\"app/candidate/portal/partials/no-document.html\",\"

    No document

    Unfortunately to fully register with Labour xchange we need you to upload certain documents which prove your eligibility to work in the UK.

    Until these documents are uploaded your profile cannot go live to employers, we will however store your profile for later time when you may be able to upload the documents required.

    In addition to a full UK passport we can accept the following documents

    For further information please visit the government information site www.gov.uk
    \");\n$templateCache.put(\"app/candidate/portal/partials/payment-details.html\",\"

    Change payment details

    \");\n$templateCache.put(\"app/candidate/portal/partials/profile-information.html\",\"

    This is your “Workface”© profile

    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, we really need this.
    Date Of Birth is invalid.
    You must be 18 or over
     
    Sorry, we really need this.
    Sorry, invalid postcode.
    Sorry, we really need this.
    {{$item.name}}{{category.name}}
    Enter a valid number.
    Minimum rate is £10.
    Minimum distance is 0.
    {{$item.name}}{{item.name}}
    {{$item.name}}{{item.name}}

    Note : Fields which are marked with * are required fields

    The most searched for job type by employers in your area is - {{vm.valuesMostSearch.workType.name}}

    The most required key skill by employers in your area is - {{vm.valuesMostSearch.keySkill.name}}

    \");\n$templateCache.put(\"app/candidate/portal/partials/rating-star.html\",\"

    Rate your experience at {{vm.ratingStar.clientUser.companyProfile.businessName}}

    {{vm.ratingStar.clientUser.companyProfile.businessName}}
    Location  {{vm.ratingStar.clientUser.companyProfile.address.postCode}}
    Address  {{vm.ratingStar.clientUser.companyProfile.address.addressLine}} {{vm.ratingStar.clientUser.companyProfile.address.houseNumber}} , {{vm.ratingStar.clientUser.companyProfile.address.addressLine}}
    About
    {{vm.ratingStar.clientUser.companyProfile.about}}

    Your experience

    \");\n$templateCache.put(\"app/candidate/portal/partials/suitable-for-care.html\",\"

    We have something for you!

    Great news we have roles local to you, helping vulnerable people in their own home to stay health and well. What could be more rewarding, especially when it fits the hours you want working, right!

    Have you considered becoming a Personal Assistant?

    What is a Personal Assistant?

    Some disabled or older people may have difficulties that make it challenging to live or perform daily activities. This can mean they need support of someone else to help increase their independence and dignity.

    A Personal Assistant is employed directly by one or more individuals to help them with various aspects of their daily lives. It’s not a traditional caring role. Whilst it may involve some personal care, the scope of the role is much broader.

    What is a Personal Assistant?

    Your tasks may include supporting people:

    • to take part in their chosen social and leisure activities
    • to attend appointments
    • to get to work, college or university
    • with washing and or dressing
    • with household tasks
    • to administer medication
    • whilst on holiday

    Don’t worry if you haven’t done this type of work before. If you’re compassionate, hardworking and driven to maximise the health and well-being of others, or if you want to play a key part enabling people to live fulfilled lives and contribute to their community, this could be the ideal role for you!

    To find out more about the role of “Being a personal assistant” download the guide here or you could select “Follow the care pathway” below to guide you through the process to discover what exciting opportunities are available to you!

    \");\n$templateCache.put(\"app/candidate/portal/partials/upload-dbs-certificate.html\",\"

    Criminal convictions

    We require you to upload a copy of your DBS certificate, if you have a copy please upload here

    Upload DBS certificate

    If you have not got a DBS we require you to apply for one here *link*. We will refund the full cost of your DBS once you complete your first assignment.

    I confirm I have submitted or applied for a DBS certificate

    I confirm I have no unspent criminal convictions

    \");\n$templateCache.put(\"app/candidate/portal/partials/upload-delivery-driver-document.html\",\"

    Please upload the following document

    Please upload a picture proof of your current address, such as a Utility bill or addressed letter

    Upload Proof of address

    Please upload a photo of your intended vehicle usage

    Upload Picture of vehicle
    \");\n$templateCache.put(\"app/candidate/portal/partials/upload-documents.html\",\"

    Upload documents

    Eligibility to work in the UK

    Please see https://www.gov.uk/legal-right-work-uk for further information

    Upload passport copy

    Currently, you are permitted to upload the following file types: jpeg, jpg, png, gif, pdf

    * Once you are happy with the passport photo please press submit then proceed to the next page

    OR

    Other documents to upload/ driving license etc.

    Upload document copy

    Currently, you are permitted to upload the following file types: jpeg, jpg, png, gif, pdf

    \");\n$templateCache.put(\"app/candidate/portal/partials/upload-photo.html\",\"

    Upload photo / video!

    At Labour Xchange we do not believe in restrictive CV`s, instead we use a 20 second video of you to sell your skills and abilities to prospective employers. A Simple quick and effective way to sell yourself. Although we highly recommend uploading this, you can skip this stage or simply add a photo.

    Upload video/photo

    {{vm.fileOnlyUpload}}

    Currently, you are permitted to upload the following file types: jpeg, jpg, png, gif, mp4

    * Once you are happy with the picture/video please press submit then proceed to the next page

    \");\n$templateCache.put(\"app/candidate/portal/partials/welcome-back.html\",\"

    Hi {{::vm.user.name}}, welcome back

    \");\n$templateCache.put(\"app/candidate/portal/partials/wheel-booking.html\",\"

    The wheels are in motion {{vm.booking.candidateUser.name}}!!

    We have contacted the employer below to confirm your possible attendance. Once the booking has been finalised we will send you a confirmation text.

    We have contacted the employer below to let them know you have availability to cover the shift. Once the employer comes back we will send you a text message.

    {{vm.booking.clientUser.companyProfile.businessName}}

     {{vm.booking.clientUser.companyProfile.address.postCode}}
     {{workType.name}},
     {{vm.booking.startDate | date:\\'dd/MM/yy\\'}} to {{vm.booking.endDate | date:\\'dd/MM/yy\\'}}  {{vm.booking.startDate | date:\\'dd/MM/yy\\'}}
     {{vm.formatDate(vm.booking.startTime) | date:\\'HH:mm\\'}} to {{vm.formatDate(vm.booking.endTime) | date:\\'HH:mm\\'}}  {{vm.formatDate(vm.booking.startTime) | date:\\'HH:mm\\'}}
     {{vm.booking.clientUser.companyProfile.about}}
    \");\n$templateCache.put(\"app/candidate/portal/partials/workface-profile.html\",\"

    This is your “Workface”© profile

    Profile not live, eligibility to work documents required

    \");\n$templateCache.put(\"app/candidate/portal/partials/yuno-quiz.html\",\"

    Hi {{::vm.user.name}}

    You have skills and abilities that no one else has, there is an employer out there who needs you! At Labour xchange we believe an individuals skills and abilities are more important than qualifications or experience.

    Help us to help you by taking the short quiz, it will provide a great in depth analysis of the not only the work that fits you best, but they work that you would most enjoy.

    \");\n$templateCache.put(\"app/candidate/signup/partials/addphoto-tooltip-modal.html\",\"\");\n$templateCache.put(\"app/candidate/signup/partials/addvideo-tooltip-modal.html\",\"\");\n$templateCache.put(\"app/candidate/signup/partials/alternative-documentation.html\",\"
    \");\n$templateCache.put(\"app/candidate/signup/partials/community-confirmation.html\",\"

    Support for self employed and protection at work

    You’re nearly there. You’ll get access to Community’s support and benefits, we will be in touch to ask you to provide payment details but you won’t be charged for the first three months – it’s free.

    Please sign me up to membership. I understand that once accepted as a member I may be subject to the union rules and I confirm the home address I\\'ve provided may be used for union ballots.

    \");\n$templateCache.put(\"app/candidate/signup/partials/community-information.html\",\"

    Support for self employed and protection at work

    To complete your sign up for Community’s free membership and to get access to their benefits, which could start saving you money straightaway, we’ve got a few more questions:

    Community’s rates are based on your total income from work. Paying no more than a fiver a month is a small price to pay for the protection and benefits that Community can offer. Because Community will help you whatever your employment or self-employment, enter your total income below and you’ll be protected for all your jobs:

    Estimated gross earnings across all work per year: ENTERS FIGURE

    Look up table behind calculates the figure as follows:

    1. £6,000 = £2.40 pm
    2. 6001 to £11,000 = £3.50pm
    3. Over £11,000 = £4.94pm

    When your free membership ends it would cost you just [£X.XX] per month to continue getting access to all Community’s benefits and to continue your protection at work.

    If you’ve previously been a member of Community or another union, please tell us here:

    \");\n$templateCache.put(\"app/candidate/signup/partials/confirmEmail.html\",\"
    \");\n$templateCache.put(\"app/candidate/signup/partials/insurance-code.html\",\"

    Finally we need to get your insurance sorted

    Even if you have insurance Just Eat will pay for additional cover from Zego to ensure you have the right cover for the Job.

    Please follow the link to the Zego website and setup an account, once you have finished the sign up process please enter your reference code below. Then whenever you are earning you are also insured, a win win right?

    Upload Insurance
    \");\n$templateCache.put(\"app/candidate/signup/partials/mode-of-transport.html\",\"

    Good news!! We have delivery driving roles in your area for the times you want to work

    The role is delivering food, very locally to you working for Just Eat, all equipment is provided and the commercial insurance costs will also be provided. The rate starts at £10 per hour, all good news so far right!!!

    Please confirm the mode of transport you have to deliver for Just Eat

    Sorry, we really need this.

    We also need a few more details but it shoudn’t take more than five minutes, and it will be totally worth your while

    \");\n$templateCache.put(\"app/candidate/signup/partials/no-document.html\",\"

    No document

    Unfortunately to fully register with Labour xchange we need you to upload certain documents which prove your eligibility to work in the UK.

    Until these documents are uploaded your profile cannot go live to employers, we will however store your profile for later time when you may be able to upload the documents required.

    In addition to a full UK passport we can accept the following documents

    For further information please visit the government information site www.gov.uk
    \");\n$templateCache.put(\"app/candidate/signup/partials/step1.html\",\"
    \");\n$templateCache.put(\"app/candidate/signup/partials/step2.html\",\"

    0) ? \\'Great News!\\' : \\'Sad News\\'\\\">

    There are {{vm.clientLength}} Employers

    In your area looking for people like you!

    Even better news

    • Registration is easy, quick and free.
    • Earn money when convenient to you with great local employers.
    • Payment is guaranteed.
    • You keep all the money you earn, no charges from us!
    \");\n$templateCache.put(\"app/candidate/signup/partials/step3.html\",\"

    Let\\'s create your \\\"Workface\\\" profile!

    ()\\\\[\\\\]\\\\.,;:\\\\s@\\\\\\\"]+(\\\\.[^<>()\\\\[\\\\]\\\\.,;:\\\\s@\\\\\\\"]+)*)|(\\\\\\\".+\\\\\\\"))@(([^<>()[\\\\]\\\\.,;:\\\\s@\\\\\\\"]+\\\\.)+[^<>()[\\\\]\\\\.,;:\\\\s@\\\\\\\"]{2,3})$/i\\' required>
    Sorry, we really need this.
    Ooops try that again.
    {{vm.emailMessage}}
    Sorry, we really need this.
    At least 8 characters please.
    Sorry, we really need this.
    Passwords must match.
    Sorry, we really need this
    The phone number is not valid
    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, invalid postcode.
    Sorry, we really need this.
    Date Of Birth is invalid.
    Sorry, we really need this.
    You must be 18 or over

    Note: Fields which are marked with * are required fields

    \");\n$templateCache.put(\"app/candidate/signup/partials/step4.html\",\"

    Let\\'s expand your \\\"Workface\\\" profile!

    {{$item.name}}{{category.name}}
    Sorry, we really need this.
    Sorry, we really need this.
    Enter a valid number.
    Minimum rate is £10.
    Sorry, we really need this.
    Enter a valid number.
    Minimum distance is 0.
    {{$item.name}}{{item.name}}
    Sorry, we really need this.
    {{$item.name}}{{item.name}}
    Sorry, we really need this.

    Note: Fields which are marked with * are required fields

    \");\n$templateCache.put(\"app/candidate/signup/partials/step5.html\",\"

    Time to sell who you are!

    At Labour Xchange we think a little differently, we don’t believe in restrictive and plain CV’s. Instead we like to get to know you, and what better way than a short 20 second video where you can sell YOU! 20 seconds for you to use how you like, selling you as a person and prospective new employee.

    Although this is not mandatory and you can skip this step, we at Labour Xchange strongly recommend uploading a short video, trust us, you’ll thank us later!

    Upload video/photo

    {{vm.fileOnlyUpload}}

    Currently, you are permitted to upload the following file types: jpeg, jpg, png, gif

    * Once you are happy with the picture/video please press submit then proceed to the next page

    \");\n$templateCache.put(\"app/candidate/signup/partials/step6.html\",\"

    This is your \\\"Workface\\\" profile

    \");\n$templateCache.put(\"app/candidate/signup/partials/step7.html\",\"

    Eligibility to work in the UK

    Before you attend work, or an interview, you will need to prove your Eligibility to Work in the UK. This is a two part process; you will need to upload a copy of your Eligibility to Work and take the original with you when attending a booking/interview.

    Feel free to upload your Eligibility to Work documentation now, or when you get your first booking.

    Upload Passport copy

    Currently, you are permitted to upload the following file types: jpeg, jpg, png, gif, pdf

    * Once you are happy with the passport photo please press submit then proceed to the next page

    \");\n$templateCache.put(\"app/candidate/signup/partials/step8.html\",\"

    A Mixed Approach to Work

    Our platform will offer you positions on a PAYE, or self employed basis, dependent on work available. You have the ability to accept or refuse each offer of working hours.

    Please note: If you accept work on a self employed basis you will be required to provide your own tax arrangements as neither Labour Xchange, or the company making the booking, will be your employer.

    Self employment work doesn`t have to be difficult, Community trade union have agreed to provide free support and guidance around this. Community TU are one the Country’s leading unions on Self employment and we pleased to partner with them to support our users.

    We have opted you in to receive free self employment support from Community TU. By opting to receive support from Community TU you accept their terms and conditions and authorise us to share your relevant details with them.

    \");\n$templateCache.put(\"app/candidate/signup/partials/step9.html\",\"

    You are up and running (nearly)

    We have emailed you a link which confirms and finalises your registration, as soon as you can click on the link and you will be able to fully access your portal and employers can begin to contact you for work.

    \");\n$templateCache.put(\"app/candidate/signup/partials/upload-dbs-certificate.html\",\"

    Criminal convictions

    We require you to upload a copy of your DBS certificate, if you have a copy please upload here

    Upload DBS certificate

    If you have not got a DBS we require you to apply for one here *link*. We will refund the full cost of your DBS once you complete your first assignment.

    I confirm I have submitted or applied for a DBS certificate

    I confirm I have no unspent criminal convictions

    \");\n$templateCache.put(\"app/candidate/signup/partials/upload-document.html\",\"

    Please upload the following document

    Please upload a picture proof of your current address, such as a Utility bill or addressed letter

    Upload Proof of address

    Please upload a photo of your intended vehicle usage

    Upload Picture of vehicle
    \");\n$templateCache.put(\"app/client/portal/modal/bookingsHistory.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/cancelBookingConfirm.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/confirmCancellation.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/employmentStatus.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/futureBookings.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/payment.html\",\"
    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, we really need this.

    {{errorPayment}}

    \");\n$templateCache.put(\"app/client/portal/modal/profileModal.html\",\"
    \\\"\\\"
    {{vm.profile.name}}
    Location  {{vm.profile.profile.address.postCode}}
    Rate  {{vm.profile.profile.minHourlyRate | currency:\\\"£\\\"}}
    Availability
       {{vm.getDateOfWeek(date.startTime)}} {{vm.formatDate(date.startTime)}} - {{vm.formatDate(date.endTime)}}
    Skills
       {{key.name}}
    Comments
       {{vm.profile.profile.about}}
    \");\n$templateCache.put(\"app/client/portal/modal/reasonRefuse.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/refund.html\",\"\");\n$templateCache.put(\"app/client/portal/modal/reportIssue.html\",\"
    \");\n$templateCache.put(\"app/client/portal/modal/reportIssueMessage.html\",\"
    \");\n$templateCache.put(\"app/client/portal/partials/amend-booking.html\",\"

    Amend booking

    1 }\\\">
    £{{vm.amendBooking.invoice.amount}}
    £{{vm.amendBooking.invoice.paidAmount}}
    £ 0 && vm.amountBooking > 0\\\">+{{vm.amountBooking}}
    0\\\">
    £{{vm.amendBooking.invoice.paidAmount + vm.amendBooking.invoice.voucher.value}}
    £ 0 && vm.amountBooking > 0\\\">+{{vm.amountBooking}}
    \");\n$templateCache.put(\"app/client/portal/partials/bookings-information.html\",\"

    Previous bookings information

    CandidateDateStatus
    {{previousBooking.startDate| date:\\'dd/MM/yyyy\\'}} - {{previousBooking.endDate| date:\\'dd/MM/yyyy\\'}} {{previousBooking.startDate | date :\\'dd/MM/yyyy\\'}}{{previousBooking.startDate| date:\\'dd/MM/yyyy\\'}} - {{previousBooking.endDate| date:\\'dd/MM/yyyy\\'}} {{previousBooking.startDate| date:\\'dd/MM/yyyy\\'}}{{vm.bookingStatus(previousBooking.status)}}{{previousBooking.invoice.amount | currency: \\'£\\'}}

    {{vm.noPreviousBookings}}

    Upcoming bookings information

    CandidateDateStatus
    {{upcomingBooking.startDate| date:\\'dd/MM/yyyy\\'}} - {{upcomingBooking.endDate| date:\\'dd/MM/yyyy\\'}} {{upcomingBooking.startDate | date :\\'dd/MM/yyyy\\'}}{{upcomingBooking.startDate| date:\\'dd/MM/yyyy\\'}} - {{upcomingBooking.endDate| date:\\'dd/MM/yyyy\\'}} {{upcomingBooking.startDate| date:\\'dd/MM/yyyy\\'}}{{vm.bookingStatus(upcomingBooking.status)}}{{upcomingBooking.invoice.amount | currency: \\'£\\'}}

    {{vm.noUpcomingBookings}}

    To confirm, cancel or amend bookings please use a desktop pc

    \");\n$templateCache.put(\"app/client/portal/partials/company-profile.html\",\"

    Your company profile

    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    \");\n$templateCache.put(\"app/client/portal/partials/confirmed-booking.html\",\"

    {{vm.candidateUser.name}} has confirmed your booking

    £{{vm.confirmedBooking.invoice.amount}} 0\\\">£{{vm.confirmedBooking.invoice.amount - vm.confirmedBooking.invoice.voucher.value}}
    0\\\">

    Previous amount due: £{{vm.confirmedBooking.invoice.amount}}

    0\\\">
    0\\\">£{{vm.confirmedBooking.invoice.paidAmount}}
    0\\\">
    0\\\">£ 0 && vm.amountBooking > 0\\\">+{{vm.amountBooking}}
    Sorry, we really need this.
    {{vm.errorMessage}}
    \");\n$templateCache.put(\"app/client/portal/partials/contact-candidates.html\",\"

    We have contacted the candidates to confirm their availability and will come back to you in four hours or less

    \");\n$templateCache.put(\"app/client/portal/partials/contact-staff.html\",\"

    We will contact these three staff to fill your booking

    \");\n$templateCache.put(\"app/client/portal/partials/find-the-staff.html\",\"

    Let\\'s find the staff you need

    {{$item.name}}{{category.name}}
    Sorry, we really need this.
    Sorry, we really need this.
    Sorry, invalid postcode.
    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    {{$item.name}}{{category.name}}
    \");\n$templateCache.put(\"app/client/portal/partials/how-communicate.html\",\"

    How we communicate

    Please select which method you would prefer us to use when communicating with you

    Preference
    Ooops try that again.
    Ooops try that again.
    The phone number is not valid
    The phone number is not valid

    Change password

    Password did not match.
    \");\n$templateCache.put(\"app/client/portal/partials/make-payment.html\",\"

    Make payment

    Booking
    {{vm.makePayment.id}}
    Invoice
    {{vm.makePayment.invoiceId}}
    Amount Due
    £{{vm.amountBooking }}
    VAT Due
    £{{vm.feeVAT}}
    Total Amount Due
    £{{vm.totalAmount}}

    No Booking

    \");\n$templateCache.put(\"app/client/portal/partials/permanent-role.html\",\"

    Offer {{vm.candidateUser.name}} a permanent role

    Should {{vm.candidateUser.name}} accept your role we will charge a {{vm.permanentRole.amount|currency:\\'£\\'}} finders fee, which will be deducted from your account
    \");\n$templateCache.put(\"app/client/portal/partials/rating-star.html\",\"

    How did {{vm.candidateUser.name}} do?

    Punctuality

    Attitude

    Quality

    \");\n$templateCache.put(\"app/client/portal/partials/re-booking.html\",\"

    Re book {{vm.candidateUser.name}}?

    {{vm.amountBooking | currency: \\'£\\'}}
    \");\n$templateCache.put(\"app/client/portal/partials/report-issue.html\",\"

    Report Issue

    {{vm.noReportIssue}}

    \");\n$templateCache.put(\"app/client/portal/partials/welcome-back.html\",\"

    Hi {{::vm.user.name}}, welcome back

    \");\n$templateCache.put(\"app/client/signup/partials/candidates.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/clientProfile.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/confirmEmail.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/findMeStaff.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/finish.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/home.html\",\"
    \");\n$templateCache.put(\"app/client/signup/partials/staffRequirements.html\",\"
    \");\n$templateCache.put(\"app/components/toastMessage/modal/amendRefusedPopupMessage.html\",\"\");\n$templateCache.put(\"app/components/toastMessage/modal/candidateCancelledPopupMessage.html\",\"\");\n$templateCache.put(\"app/components/toastMessage/modal/clientCancelledPopupBeforePaymentMessageModal.html\",\"\");\n$templateCache.put(\"app/components/toastMessage/modal/clientCancelledPopupMessage.html\",\"\");\n$templateCache.put(\"app/components/toastMessage/modal/popupMessage.html\",\"\");}]);"],"sourceRoot":"/source/"}