"use strict";angular.module("hirecoworkerApp.ListingFavorites",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]),angular.module("hirecoworkerApp").directive("listingFavorites",function($filter){return{restrict:"E",template:'

{{"Add to wish list" | translate}}

',scope:!0,controller:function($scope,$rootScope,EditUserFavorite,UserFavorite,$state,flash){$scope.state_user_view=!1,"UserView"===$state.current.name&&($scope.state_user_view=!0),$scope.UserFavorite=function(user,type){var params={};params.user_id=user.id,params.username=user.username,1===parseInt(type)?(user.is_favorite=!1,EditUserFavorite["delete"]({userFavoriteId:user.favorite_id},function(response){0!==response.error.code?user.is_favorite=!0:"UserView"===$state.current.name&&flash.set($filter("translate")("User removed from favorite list."),"success",!1)})):2===parseInt(type)&&(user.is_favorite=!0,UserFavorite.post(params,function(response){0!==response.error.code?user.is_favorite=!1:(user.favorite_id=response.data.id,"UserView"===$state.current.name&&flash.set($filter("translate")("User added to favorite list."),"success",!1))}))}}}}),angular.module("hirecoworkerApp").factory("UserFavorite",["$resource",function($resource){return $resource("/api/v1/user_favorites",{},{get:{method:"GET"},post:{method:"POST"}})}]).factory("EditUserFavorite",["$resource",function($resource){return $resource("/api/v1/user_favorites/:userFavoriteId",{userFavoriteId:"@userFavoriteId"},{get:{method:"GET"},"delete":{method:"DELETE"}})}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.ListingFavorites');"use strict";angular.module("hirecoworkerApp.Translations",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]),angular.module("hirecoworkerApp.Translations").factory("languageList",function($resource){return $resource("/api/v1/settings/site_languages",{},{get:{method:"GET"}})}).service("LocaleService",function($translate,$rootScope,tmhDynamicLocale,languageList,$cookies){var localesObj,localesObj1={};localesObj1.locales={},localesObj1.preferredLocale={};var _LOCALES,_LOCALES_DISPLAY_NAMES=[];languageList.get(function(response){$.each(response.site_languages,function(i,data){localesObj1.locales[data.iso2]=data.name}),localesObj1.preferredLocale=response.site_languages[0].iso2,localesObj=localesObj1.locales,_LOCALES=Object.keys(localesObj),_LOCALES&&0!==_LOCALES.length||console.error("There are no _LOCALES provided"),_LOCALES.forEach(function(locale){_LOCALES_DISPLAY_NAMES.push(localesObj[locale])})});var currentLocale=$translate.use()||$translate.preferredLanguage();$cookies.put("currentLocale",currentLocale,{path:"/"});var checkLocaleIsValid=function(locale){return-1!==_LOCALES.indexOf(locale)},setLocale=function(locale){return checkLocaleIsValid(locale)?(currentLocale=locale,$cookies.put("currentLocale",currentLocale,{path:"/"}),void $translate.use(locale)):void console.error('Locale name "'+locale+'" is invalid')};return $rootScope.$on("$translateChangeSuccess",function(event,data){document.documentElement.setAttribute("lang",data.language),$rootScope.$emit("changeLanguage",{currentLocale:data.language}),tmhDynamicLocale.set(data.language.toLowerCase().replace(/_/g,"-"))}),{getLocaleDisplayName:function(){return angular.isDefined(localesObj)?localesObj[currentLocale]:void 0},setLocaleByDisplayName:function(localeDisplayName){setLocale(_LOCALES[_LOCALES_DISPLAY_NAMES.indexOf(localeDisplayName)])},getLocalesDisplayNames:function(){return _LOCALES_DISPLAY_NAMES}}}).directive("ngTranslateLanguageSelect",function(LocaleService){return{restrict:"AE",templateUrl:"scripts/plugins/Translations/Translations/views/language_translate.html",controller:function($scope,$rootScope,$timeout,languageList,$window,$cookies){languageList.get(function(response){$scope.localesDisplayNames=response.site_languages,$scope.check_language=$cookies.get("currentLocale"),"undefined"!=$scope.check_language&&$scope.check_language?$scope.default_language=$cookies.get("currentLocale"):$scope.default_language=$rootScope.settings.SITE_DAFAULT_LANGUAGE,angular.forEach($scope.localesDisplayNames,function(value){value.iso2===$scope.default_language&&($scope.currentLocaleDisplayName=value.name,$scope.changeLanguage(value.name))}),$scope.visible=$scope.localesDisplayNames&&$scope.localesDisplayNames.length>1}),$scope.changeLanguage=function(locale){LocaleService.setLocaleByDisplayName(locale)}}}}),angular.module("hirecoworkerApp.Translations").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Translations/Translations/views/language_translate.html",'
  • ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Translations');"use strict";angular.module("hirecoworkerApp.Withdrawal",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("user_cash_withdrawals",{url:"/users/cash_withdrawals",templateUrl:"scripts/plugins/Withdrawal/Withdrawal/views/cash_withdrawals.html",controller:"CashWithdrawalsController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("CashWithdrawalsController",["$scope","$cookies","$rootScope","$state","cashWithdrawals","myUserFactory","$filter","moneyTransferAccount","flash",function($scope,$cookies,$rootScope,$state,cashWithdrawals,myUserFactory,$filter,moneyTransferAccount,flash){0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$rootScope.subHeader="Account",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$scope.currentPage=1,$scope.lastPage=1;var params={};$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Revenue Withdrawals"),$scope.minimum_withdraw_amount=$rootScope.settings.USER_MINIMUM_WITHDRAW_AMOUNT,$scope.maximum_withdraw_amount=$rootScope.settings.USER_MAXIMUM_WITHDRAW_AMOUNT,$scope.user_available_balance=$rootScope.auth.available_wallet_amount,$scope.withDrawAmount=200,$scope.mul=$scope.withDrawAmount*$rootScope.settings.WITHDRAW_REQUEST_FEE,$scope.ExampleAmount=$scope.withDrawAmount-$rootScope.settings.WITHDRAW_REQUEST_FEE,$scope.total=$scope.mul/100,$scope.account_error=!1,$scope.index=function(){$scope.loader=!0,myUserFactory.get({},function(response){$scope.user_available_balance=response.data.available_wallet_amount,0===parseInt($scope.user_available_balance)?($scope.getMyuser(),$scope.is_show_wallet_paybtn=!1):$scope.is_show_wallet_paybtn=!0}),params={},params.user_id=$rootScope.auth.id,moneyTransferAccount.get(params,function(response){angular.isDefined(response.data)&&($scope.moneyTransferList=response.data)})},$scope.getCashWithdrawlList=function(){params={},params.user_id=$rootScope.auth.id,$scope.skipvalue=void 0!==$scope.itemsPerPage?($scope.currentPage-1)*$scope.itemsPerPage:0,$scope.itemsPerPage=void 0!==$scope.itemsPerPage?$scope.itemsPerPage:0,params.filter='{"limit":'+$scope.itemsPerPage+',"skip":'+$scope.skipvalue+"}",cashWithdrawals.get(params,function(response){angular.isDefined(response.data)&&($scope.cashWithdrawalsList=response.data),$scope.loader=!1})},$scope.selectedAcc=function(id){$scope.account_id=id,$scope.account_error=!1},$scope.getMyuser=function(){$rootScope.isAuth&&myUserFactory.get(function(response){$scope.my_user=response.data})},$scope.userCashWithdrawSubmit=function($valid){var params={};void 0===$scope.account_id?$scope.account_error=!0:$scope.account_error=!1,$valid&&($scope.amount=parseFloat($("#amount").val()),parseFloat($scope.user_available_balance)>=$scope.amount?(params.amount=$scope.amount,params.money_transfer_account_id=$scope.account_id,params.remark="",params.user_id=$rootScope.auth.id,cashWithdrawals.save(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Your request submitted successfully."),"success",!0),$state.reload())},function(){flash.set($filter("translate")("Withdraw request could not be added"),"error",!1)})):flash.set("You Dont have sufficient amount in your wallet.","error",!1))},$scope.getCashWithdrawlList(),$scope.index(),$scope.paginate_cashwithdrawl=function(currentPage){$scope.currentPage=currentPage,$scope.getCashWithdrawlList()}}]),angular.module("hirecoworkerApp").factory("cashWithdrawals",["$resource",function($resource){return $resource("/api/v1/users/:user_id/user_cash_withdrawals",{},{get:{method:"GET",params:{user_id:"@user_id"}},save:{method:"POST",params:{user_id:"@user_id"}}})}]).factory("moneyTransferAccount",["$resource",function($resource){return $resource("/api/v1/users/:user_id/money_transfer_accounts/:account",{},{get:{method:"GET",params:{user_id:"@user_id"}},save:{method:"POST",params:{user_id:"@user_id"}},"delete":{method:"DELETE",params:{user_id:"@user_id",account:"@account"}},put:{method:"PUT",params:{userId:"@userId",account:"@account"}}})}]).factory("myUserFactory",["$resource",function($resource){return $resource("/api/v1/me/users",{},{get:{method:"GET"}})}]),angular.module("hirecoworkerApp.Withdrawal").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Withdrawal/Withdrawal/views/cash_withdrawals.html",'
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Withdrawal');"use strict";angular.module("hirecoworkerApp.PayPal",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("CreditCard",{url:"/credit_cards",templateUrl:"scripts/plugins/PayPal/PayPal/views/credit_card.html",controller:"CreditCardController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("CreditCardController",["$rootScope","$scope","flash","$filter","$state","$cookies","SweetAlert","CreditCardFactory","CreditCardGetFactory","CreditCardRemoveFactory",function($rootScope,$scope,flash,$filter,$state,$cookies,SweetAlert,CreditCardFactory,CreditCardGetFactory,CreditCardRemoveFactory){$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Saved Credit Cards"),$rootScope.subHeader="Account",$cookies.put("subHeader",$rootScope.subHeader),$scope.user_profile={cardType:""},$scope.show=!1,$scope.disable_btn=!1,$rootScope.gotoHeader(),$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$scope.index=function(){CreditCardGetFactory.get(function(response){angular.isDefined(response.data)&&($scope.creditCardLists=response.data)})},$scope.showing=function(){$scope.show=!0},$scope.userCreditCard=function($valid,value){if(void 0===$scope.user_profile.credit_card_number&&$valid===!1&&($scope.showing_error=!0,$scope.showing_value="Please enter valid credit card number"),$valid){$scope.disable_btn=!0;var flashMessage;$scope.user_profile.credit_card_type=$scope.user_profile.cardType,$scope.user_profile.expire_year=$scope.user_profile.credit_card_expired.year,$scope.user_profile.expire_month=$scope.user_profile.credit_card_expired.month,CreditCardFactory.post($scope.user_profile,function(response){$scope.disable_btn=!1,$scope.response=response,$state.reload(),flash.set($filter("translate")(response.error.message),"success",!0)},function(response){$scope.errorMessage=$filter("translate")("We are unable to process your request. Please try again."),response.data.error.fields&&angular.forEach(response.data.error.fields,function(value){$scope.errorMessage=$scope.errorMessage+" "+value.issue}),flashMessage=$filter("translate")($scope.errorMessage),flash.set(flashMessage,"error",!1)})}},$scope.CreditCaredDelete=function(id){SweetAlert.swal({title:$filter("translate")("Are you sure you want to delete?"),text:"",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"OK",cancelButtonText:"Cancel",closeOnConfirm:!0,animation:!1},function(isConfirm){isConfirm&&CreditCardRemoveFactory["delete"]({userCreditCardId:id},function(response){$scope.response=response,0===$scope.response.error.code?($state.reload(),flash.set($filter("translate")("Credit card deleted successfully."),"success",!1)):flash.set($filter("translate")("Credit card not deleted."),"error",!1)},function(errorResponse){flash.set($filter("translate")(errorResponse.error.message),"success",!0)})})},$scope.index()}]),angular.module("hirecoworkerApp").factory("CreditCardFactory",["$resource",function($resource){return $resource("/api/v1/user_credit_cards",{},{post:{method:"POST"}})}]).factory("CreditCardGetFactory",["$resource",function($resource){return $resource("/api/v1/me/user_credit_cards",{},{get:{method:"GET"}})}]).factory("CreditCardRemoveFactory",["$resource",function($resource){return $resource("/api/v1/user_credit_cards/:userCreditCardId",{userCreditCardId:"@userCreditCardId"},{"delete":{method:"DELETE"}})}]),angular.module("hirecoworkerApp.PayPal").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/PayPal/PayPal/views/credit_card.html",'

    {{\'Account - Saved credit cards\'| translate}}

    • {{creditCardList.name_on_the_card}}

      {{creditCardList.masked_card_number}}

      {{\'Expires:\' | translate}} {{creditCardList.credit_card_expire}}

    {{\'Required\'|translate}}
    {{\'Please enter valid credit card number\'|translate}}
    {{showing_value}}
    {{\'Required\'| translate }}
    {{\'Required\'|translate}}
    {{\'Please enter valid expiry date\'|translate}}
    {{\'Required\'| translate }} {{\'Minimum length is 3\'| translate}} {{\'Maximum length is 3\'| translate}}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.PayPal');"use strict";angular.module("hirecoworkerApp.Review",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]),angular.module("hirecoworkerApp").controller("ReviewController",function($scope,$state,$filter,$rootScope,AppointmentStatus,flash,ConstUserType,ConstAppointmentStatus,ConstService,$window,md5,$cookies,ReviewFactory,ReviewUpdate,AllReviews){$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$scope.enabled=!1,$scope.showClose=!1,$scope.review=[],$rootScope.subHeader="Bookings & messages",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$scope.user_review=[],$scope.user_review_count=0,$scope.enable_review=!0,$scope.showEdit=!0,$scope.showUpdate=!1;var params={};params.filter='{"where":{"foreign_id":'+$state.params.id+"}}",AllReviews.get(params,function(response){$scope.user_review=response.data,$scope.user_review_count=$scope.user_review.length}),$scope.UpdateReview=function(){params={},params.reviewId=$scope.user_review[0].id,params.message=$scope.user_review[0].message,ReviewUpdate.update(params).$promise.then(function(response){0===response.error.code?flash.set($filter("translate")("review updated successfully."),"success",!0):flash.set($filter("translate")(response.error.message),"error",!1)})},$scope.reviewSubmit=function(is_valid){params={},is_valid&&0===$scope.review.rating?(is_valid=!1,$scope.rating_review=!1):is_valid&&$scope.review.rating>0&&(is_valid=!0,$scope.rating_review=!0),is_valid&&($scope.reviewid||(params={},params.foreign_id=$state.params.id,params["class"]="Appointment",params.rating=$scope.review.rating,params.message=$scope.review.message,ReviewFactory.add(params,function(response){0===response.error.code?(flash.set($filter("translate")("review added successfully."),"success",!0),$scope.user_review=[],$scope.user_review.push(response.data),$scope.user_review_count=$scope.user_review.length):flash.set($filter("translate")(response.error.message),"error",!1)})))}}),angular.module("hirecoworkerApp").directive("reviewPost",function($filter){return{restrict:"E",templateUrl:"scripts/plugins/Review/Review/views/review_booking_view.html",scope:!0,controller:"ReviewController"}}).directive("reviewShow",function($filter){return{restrict:"E",templateUrl:"scripts/plugins/Review/Review/views/review_user_view.html",scope:!0,controller:function($scope,$rootScope,AllReviews,$state,$window,md5){var params={};$scope.reviews=[],$scope.currentPage=$scope.lastPage=1,$scope.show_more=!1,$scope.getReviews=function(){$scope.skipvalue=void 0!==$scope.itemsPerPage?$scope.currentPage*$scope.itemsPerPage:0,$scope.itemsPerPage=10,params.filter='{"order":"id desc","limit":'+$scope.itemsPerPage+',"skip":'+$scope.skipvalue+',"where":{"to_user_id":'+$state.params.user_id+'},"include": {"0":"user","1":"user.attachment","2":"user.user_profile"}}',AllReviews.get(params).$promise.then(function(response){response._metadata&&($scope.currentPage=response._metadata.current_page,$scope.lastPage=response._metadata.last_page,$scope.itemsPerPage=response._metadata.per_page,$scope.totalRecords=response._metadata.total,$scope.show_more=$scope.totalRecords>$scope.currentPage*$scope.itemsPerPage?!0:!1),angular.forEach(response.data,function(value){if(angular.isDefined(value.user)&&angular.isDefined(value.user.attachment)){var hash=md5.createHash(value.user.attachment["class"]+value.user.attachment.id+"pngsmall_thumb");value.review_image="images/small_thumb/"+value.user.attachment["class"]+"/"+value.user.attachment.id+"."+hash+".png"}else value.review_image=$window.theme+"images/default.png";$scope.reviews.push(value)})})},$scope.getReviews(),$scope.paginate_reviews=function(){$scope.getReviews()}}}}),angular.module("hirecoworkerApp").factory("AllReviews",["$resource",function($resource){return $resource("/api/v1/reviews",{},{get:{method:"GET"},add:{method:"POST"}})}]).factory("ReviewFactory",["$resource",function($resource){return $resource("/api/v1/reviews",{},{add:{method:"POST"}})}]).factory("ReviewUpdate",["$resource",function($resource){return $resource("/api/v1/reviews/:reviewId",{reviewId:"@reviewId"},{update:{method:"PUT"}})}]).factory("UserReviews",["$resource",function($resource){return $resource("/api/v1/reviews/:doctor_id/:user_id",{doctor_id:"@doctor_id",user_id:"@user_id"},{get:{method:"GET"},add:{method:"POST"}})}]).factory("ReviewAdd",["$resource",function($resource){return $resource("/api/v1/reviews/add",{},{add:{method:"POST"}})}]),angular.module("hirecoworkerApp.Review").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Review/Review/views/review_booking_view.html",'
    {{\' Required\' | translate }} {{\'Required\' | translate }}
    {{\'Required\'| translate }}
    {{\'Review\'|translate}}
    {{user_review[0].message}}
    '),$templateCache.put("scripts/plugins/Review/Review/views/review_user_view.html",'
    {{reviews.length}} {{\'reviews\' | translate}}
    • {{review.created_at| timeago}}

    {{review.message}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Review');"use strict";angular.module("hirecoworkerApp.OnlineAssessment",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("assessment",{url:"/assessment",templateUrl:"scripts/plugins/OnlineAssessment/OnlineAssessment/views/assesment.html",controller:"AssessmentController",resolve:getToken}).state("AssessmentDetails",{url:"/assessment/step/:id",templateUrl:"scripts/plugins/OnlineAssessment/OnlineAssessment/views/assessment_detail.html",controller:"AssessmentController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("AssessmentController",function($state,$scope,QuizesFactory,QuizesQuestionFactory,QuizQuestionAnswerOptionFactory,$cookies,flash,UserProfilesFactory,$filter,$rootScope,$location,Upload,GENERAL_CONFIG,ConstSocialLogin,ConstThumb,$timeout){$scope.setMetaData=function(){var fullUrl=$location.absUrl();angular.element('meta[property="og:url"]').attr("content",fullUrl)},$scope.answerChange=function(parentIndex,index){$scope.checked=$scope.que[parentIndex].options[index].selected_code,angular.forEach($scope.que,function(value,key){angular.forEach(value.options,function(childvalue){key===parentIndex&&(childvalue.selected_code="")})}),$scope.que[parentIndex].options[index].selected_code=$scope.checked},$scope.init=function(){$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Online Assessment"),$scope.setMetaData(),$scope.ConstSocialLogin=ConstSocialLogin,$scope.thumb=ConstThumb.user,$scope.params={},$scope.click=!1,$scope.valid=!0,5===parseInt($state.params.id)&&($scope.click=!0,$scope.valid=!1),$scope.quizes=[],QuizesFactory.get().$promise.then(function(response){$scope.size=response.data,angular.forEach(response.data,function(childvalue){parseInt($state.params.id)===parseInt(childvalue.id)&&$scope.quizes.push(childvalue)})}),$scope.questions=[],QuizesQuestionFactory.get().$promise.then(function(response){angular.forEach(response.data,function(childvalue){parseInt($state.params.id)===parseInt(childvalue.quiz_id)&&$scope.questions.push(childvalue)})}),$scope.que=[];var params={};params.filter='{"limit":500,"skip":"0"}',QuizQuestionAnswerOptionFactory.get(params).$promise.then(function(response){$timeout(function(){angular.forEach($scope.questions,function(questionvalue,questionkey){$scope.que.push({quiz_id:questionvalue.id,question:questionvalue.question}),$scope.que[questionkey].options=[],angular.forEach(response.data,function(childvalue){1===parseInt(childvalue.is_correct_answer)&&($scope.que[questionkey].answerId=childvalue.id),parseInt(questionvalue.id)===parseInt(childvalue.quiz_question_id)&&($scope.que[questionkey].options.push(childvalue),childvalue.selected_code=0)})})},50)})},$scope.init(),$scope.userSubmit=function(){angular.forEach($scope.que,function(quevalue,quekey){$scope.setcorrect=!0,$scope.setprovided=!0,angular.forEach(quevalue.options,function(childvalue){0!==childvalue.selected_code&&($scope.setprovided=!1,1===childvalue.is_correct_answer&&childvalue.id===childvalue.selected_code&&($scope.setcorrect=!1))}),$scope.setprovided===!1&&($scope.que[quekey].showNotCorrect=$scope.setcorrect),$scope.que[quekey].showNotProvided=$scope.setprovided}),angular.forEach($scope.que,function(value,key){0===key&&value.showNotCorrect===!1&&value.showNotProvided===!1&&($scope.value=!0),1===key&&value.showNotCorrect===!1&&value.showNotProvided===!1&&($scope.value_start=!0),2===key&&value.showNotCorrect===!1&&value.showNotProvided===!1&&($scope.value_end=!0)}),$scope.value&&$scope.value_start&&5!==parseInt($state.params.id)&&($scope.adding=parseInt($state.params.id)+1,$state.go("AssessmentDetails",{id:$scope.adding},{reload:!0})),void 0!==$scope.value_end&&$scope.value&&$scope.value_start&&$scope.value_end&&5===parseInt($state.params.id)&&($scope.user_profile={},$scope.user_profile.is_online_assessment_test_completed=1,UserProfilesFactory.update($scope.user_profile).$promise.then(function(){flash.set($filter("translate")("Online Assessment has been completed"),"success",!0),$state.go("user_dashboard")}))}}),angular.module("hirecoworkerApp").factory("QuizesFactory",["$resource",function($resource){return $resource("/api/v1/quizzes",{},{},{get:{method:"GET"}})}]).factory("QuizesQuestionFactory",["$resource",function($resource){return $resource("/api/v1/quiz_questions",{},{},{get:{method:"GET"}})}]).factory("QuizQuestionAnswerOptionFactory",["$resource",function($resource){return $resource("/api/v1/quiz_question_answer_options",{},{},{get:{method:"GET"}})}]),angular.module("hirecoworkerApp.OnlineAssessment").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/OnlineAssessment/OnlineAssessment/views/assesment.html",'

    [Image: Online Assessment]

    {{\'Online Assessment\' | translate}}

    {{\'Please allow at least 20 minutes to read the advice and answer the questions\' | translate}}.

    '),$templateCache.put("scripts/plugins/OnlineAssessment/OnlineAssessment/views/assessment_detail.html",'

    {{qu.name | translate}}

    1. {{quizing.question | translate}}

      {{\'It looks like you forgot to answer this question\'| translate}}.

      {{\'Please provide correct answer\'| translate}}

    {{qu.display_order}} {{\'of\'| translate}} {{size.length}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.OnlineAssessment');"use strict";angular.module("hirecoworkerApp.Referral",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("referrals",{url:"/refer_friends",templateUrl:"scripts/plugins/Referral/Referral/views/referal_index.html",controller:"ReferalController",resolve:getToken}).state("affiliates",{url:"/referrals/:username",controller:"AffiliateReferralController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("ReferalController",function($state,$scope,flash,ReferFriends,$location,$filter,UserProfilesFactory,$rootScope,SmsRecend,SmsVerify,$timeout,$interval,providers){$scope.init=function(){$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Refer Friends"),providers.get(function(providers){angular.forEach(providers.data,function(res){"facebook"===res.slug&&($scope.facebook_provider=res.api_key),"twitter"===res.slug&&($scope.twitter_provider=res.api_key)})})},$scope.data={},$scope.element={};var counter=0;$scope.elements=[{id:counter}],$scope.myText="Hi ,",$scope.referal_link=$location.protocol()+"://"+$location.host()+"/referrals/"+$rootScope.auth.reference_code,$scope.referal_description="Have you tried "+$rootScope.settings.SITE_NAME+" to find a service provider? Claim "+$rootScope.settings.CURRENCY_SYMBOL+$rootScope.settings.AFFILIATE_REFERRAL_AMOUNT_NEW_USER+" free credit with my invitation.",$scope.newItem=function(){counter++,$scope.elements.push({id:counter})},$scope.site_name=$rootScope.settings.SITE_NAME,$scope.data.message="How are you? I use "+$rootScope.settings.SITE_NAME+" to find local service provider, its great! If you sign up now you get "+$rootScope.settings.CURRENCY_SYMBOL+$rootScope.settings.AFFILIATE_REFERRAL_AMOUNT_NEW_USER+" credit to spend on "+$rootScope.settings.SITE_NAME+" next time you need someone to care for your work.",$scope.init(),$scope.referalSend=function(value,$valid){$valid&&($scope.referal={},$scope.referal.contacts=[],angular.forEach($scope.elements,function(value){$scope.referal.contacts.push({name:value.name,email:value.email})}),$scope.referal.message=value.message,ReferFriends.save($scope.referal,function(response){flash.set($filter("translate")(response.error.message),"success",!0)},function(errorResponse){flash.set($filter("translate")(errorResponse.data.error.message),"error",!0)}))}}).controller("AffiliateReferralController",["$rootScope","$scope","$stateParams","$state","$cookies",function($rootScope,$scope,$stateParams,$state,$cookies){var affiliate_expiry=Number($rootScope.settings.AFFILIATE_EXPIRE_TIME||0),expireDate=new Date;expireDate.setHours(expireDate.getHours()+affiliate_expiry),$cookies.put("referral_username",$state.params.username,{expires:expireDate}),$state.go("home",{reload:!0})}]).directive("selectOnClick",["$window",function($window){return function(scope,element){element.bind("click",function(){$window.getSelection().toString()||this.setSelectionRange(0,this.value.length)})}}]),angular.module("hirecoworkerApp").factory("ReferFriends",function($resource){return $resource("/api/v1/invite_friends",{},{save:{method:"POST"}})}),angular.module("hirecoworkerApp.Referral").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Referral/Referral/views/referal_index.html",'

    {{$root.auth.affiliate_pending_amount|currency: currency_type}}

    {{\'CURRENT CREDIT BALANCE TO SPEND\' | translate}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Referral');"use strict";angular.module("hirecoworkerApp.SMS",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("SmsVerify",{url:"/mobile_number_verification",templateUrl:"scripts/plugins/SMS/SMS/views/sms_index.html",controller:"SmsController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("SmsController",function($state,$scope,flash,$filter,UserProfilesFactory,$rootScope,SmsRecend,SmsVerify,$timeout,$interval){$scope.init=function(){$scope.sms={},$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Mobile number verification");var params={};params.filter='{"include":{"0":"user"}}',UserProfilesFactory.get(params).$promise.then(function(response){$scope.phone_number=response.user.phone_number,null!=response.user.mobile_code?$scope.mobile_code=response.user.mobile_code:$scope.mobile_code="",0==response.user.is_mobile_number_verified?$scope.mobile_verified=!0:$scope.mobile_verified=!1}),$scope.show=!1,$scope.hide=!0},$scope.init(),$scope.smsVerify=function($valid){if($valid){var param={};param.otp=$scope.sms.otp,param.id=$rootScope.auth.id,SmsVerify.save(param,function(response){0===response.error.code&&flash.set($filter("translate")(response.error.message),"success",!0),$state.go("user_profile",{type:"personal"})},function(response){flash.set($filter("translate")(response.data.error.message),"error",!1)})}},$scope.showing=function(){$scope.show=!0,$scope.hide=!1},$scope.smsResend=function(){SmsRecend.post().$promise.then(function(response){if(0===response.error.code){flash.set($filter("translate")(response.error.message),"success",!0),$scope.showing=!1,$scope.value=!0,$scope.countDown=20;var stop;stop=$interval(function(){$scope.countDown>0?$scope.countDown=$scope.countDown-1:($scope.stopFight(),$scope.value=!1)},1e3),$scope.stopFight=function(){$interval.cancel(stop),stop=void 0},$timeout(function(){$scope.showing=!0},2e4)}else flash.set($filter("translate")(response.error.message),"error",!1)})}}),angular.module("hirecoworkerApp").factory("SmsRecend",["$resource",function($resource){return $resource("/api/v1/users/resend_otp",{},{post:{method:"POST"}})}]).factory("SmsVerify",function($resource){return $resource("/api/v1/users/:id/verify_otp",{id:"@id"},{save:{method:"POST"}})}),angular.module("hirecoworkerApp.SMS").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/SMS/SMS/views/sms_index.html",'

    {{\'Mobile number verification\'|translate}}

    {{\'We send OTP for your registered mobile number\'|translate}} {{phone}}
    {{\'Your mobile number is already verified\' | translate}}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.SMS');"use strict";angular.module("hirecoworkerApp.PaymentBooking",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("PaymentGateway",{url:"/payments/:class/:id?is_bonus",templateUrl:"scripts/plugins/PaymentBooking/PaymentBooking/views/gateway.html",controller:"GatewayController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("GatewayController",function($rootScope,$scope,$window,$stateParams,flash,$location,$filter,$state,ConstPaymentGateways,PaymentGatewaySingle,appointmentView,md5,PaymentGatewayList,PaymentOrder,CreditCardGetFactory,ConstService){$rootScope.header=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Confirm your Payment"),$scope.id=$stateParams.id,$scope.minimum_wallet_amount=$rootScope.settings.WALLET_MIN_WALLET_AMOUNT,$scope.maximum_wallet_amount=$rootScope.settings.WALLET_MAX_WALLET_AMOUNT,$scope.buyer={cardType:""},$scope.buyer.credit_card_expired={},$scope.plan={},$scope.showCard=!1,$scope.class_showing=!1,$scope.showCardDetail=!1,$scope.paynow_is_disabled=!1,$scope.payment_note_enabled=!1,$scope.payer_form_enabled=!0,$scope.is_wallet_page=!0,$scope.plan_info={},$scope.save_btn=!1,$scope.first_gateway_id="",$scope.cardType="",$scope.plan_info.price_final=10,$scope.affiliate_plugin_enabled=!1,$scope.credit_card_enabled=!1,$scope.paypal_plugin_enabled=!1,$scope.is_bonus=!1,$scope.index=function(){var params={};params.filter='{"limit":500, "skip":0}',("pro_account"===$state.params["class"]||"top_user"===$state.params["class"])&&($scope.class_showing=!0),1===parseInt($state.params.is_bonus)&&($scope.is_bonus=!0),PaymentGatewayList.get(params,function(payment_response){var payment_gateways=new Array;if(payment_response.wallet&&($scope.wallet_enabled=!0,0===parseInt($scope.user_available_balance)?$scope.is_show_wallet_paybtn=!1:$scope.is_show_wallet_paybtn=!0),payment_response.PayPalREST){var response=payment_response.PayPalREST;response.paypalrest_enabled&&($scope.paypal_plugin_enabled=!0)}$scope.group_gateway_id="",0===payment_response.error.code&&void 0!==payment_response.zazpay&&(angular.forEach(payment_response.zazpay.gateways,function(gateway_group_value,gateway_group_key){0===gateway_group_key&&($scope.group_gateway_id=gateway_group_value.id,$scope.first_gateway_id=gateway_group_value.id),angular.forEach(gateway_group_value.gateways,function(payment_geteway_value,payment_geteway_key){var payment_gateway={},suffix="sp_";0===gateway_group_key&&($scope.sel_payment_gateway="sp_"+payment_geteway_value.id),suffix+=payment_geteway_value.id,payment_gateway.id=payment_geteway_value.id,payment_gateway.payment_id=suffix,payment_gateway.group_id=gateway_group_value.id,payment_gateway.display_name=payment_geteway_value.display_name,payment_gateway.thumb_url=payment_geteway_value.thumb_url,payment_gateway.suffix=payment_geteway_value._form_fields._extends_tpl.join(),payment_gateway.form_fields=payment_geteway_value._form_fields._extends_tpl.join(),payment_gateway.instruction_for_manual=payment_geteway_value.instruction_for_manual,payment_gateways.push(payment_gateway)})}),$scope.gateway_groups=payment_response.zazpay.gateways,$scope.payment_gateways=payment_gateways,$scope.form_fields_tpls=payment_response.zazpay._form_fields_tpls,$scope.show_form=[],$scope.form_fields=[],angular.forEach($scope.form_fields_tpls,function(key,value){"buyer"===value&&($scope.form_fields[value]="views/buyer.html"),"credit_card"===value&&($scope.form_fields[value]="views/credit_card.html"),"manual"===value&&($scope.form_fields[value]="views/manual.html"),$scope.show_form[value]=!0}),$scope.gateway_id=ConstPaymentGateways.ZazPay)}),params={},params.filter='{"limit":500,"skip":0}',CreditCardGetFactory.get(params,function(response){$scope.credit_card_details=response.data,$scope.credit_card_details.length>0&&($scope.buyer.selected_card=$scope.credit_card_details[0].id)}),"appointments"===$state.params["class"]&&(params={},params.id=$state.params.id,params.filter='{"include":{"1":"user.attachment","2":"provider_user.attachment","3":"user.user_profile","4":"provider_user.user_profile"}}',appointmentView.get(params,function(response){$scope.appointmentInfo=response.data;var hash;$scope.appointmentInfo.user.attachment&&(hash=md5.createHash($scope.appointmentInfo.user.attachment["class"]+$scope.appointmentInfo.user.attachment.id+"pngsmall_thumb"),$scope.appointmentInfo.userImage="images/small_thumb/"+$scope.appointmentInfo.user.attachment["class"]+"/"+$scope.appointmentInfo.user.attachment.id+"."+hash+".png"),$scope.appointmentInfo.provider_user.attachment&&(hash=md5.createHash($scope.appointmentInfo.provider_user.attachment["class"]+$scope.appointmentInfo.provider_user.attachment.id+"pngsmall_thumb"),$scope.appointmentInfo.providerImage="images/small_thumb/"+$scope.appointmentInfo.provider_user.attachment["class"]+"/"+$scope.appointmentInfo.provider_user.attachment.id+"."+hash+".png"),$scope.site_commision=parseInt($scope.appointmentInfo.service_id)!==ConstService.Interview?$rootScope.settings.SITE_COMMISSION_FOR_BOOKING_FROM_CUSTOMER:$rootScope.settings.SITE_COMMISSION_FOR_INTERVIEW_FROM_CUSTOMER,$scope.Booking_amount=1!==parseInt($state.params.is_bonus)?parseFloat($scope.appointmentInfo.total_booking_amount)+parseFloat($scope.appointmentInfo.used_affiliate_amount):$scope.Booking_amount=parseFloat($scope.appointmentInfo.bonus_amount)+parseFloat($scope.appointmentInfo.used_affiliate_amount),$scope.Booking_amount=$scope.Booking_amount+$scope.Booking_amount*parseFloat($scope.site_commision)/100,$scope.tempArray=$rootScope.settings.SITE_ENABLED_PLUGINS.split(","),angular.forEach($scope.tempArray,function(value){"Referral"===value&&($scope.affiliate_plugin_enabled=!0)}),$scope.appointmentInfo.user.affiliate_pending_amount>0&&$scope.affiliate_plugin_enabled===!0?($scope.total_amount=parseFloat($scope.appointmentInfo.user.affiliate_pending_amount)>parseFloat($scope.Booking_amount)?parseInt($scope.appointmentInfo.user.affiliate_pending_amount)-parseFloat($scope.Booking_amount):parseFloat($scope.Booking_amount)-parseFloat($scope.appointmentInfo.user.affiliate_pending_amount),$scope.total_affiliate_amount=parseFloat($scope.appointmentInfo.user.affiliate_pending_amount)-parseFloat($scope.Booking_amount),$scope.total_affiliate_amount>0&&($scope.total_amount=0)):$scope.total_amount=parseFloat($scope.Booking_amount)})),$scope.paypal_paynow=function($valid,type){params={},"card"===type&&(""!==$scope.buyer.selected_card&&void 0!==$scope.buyer.selected_card&&null!==$scope.buyer.selected_card?(params.user_credit_card_id=$scope.buyer.selected_card,$valid=!0):(params.cvv2=$scope.buyer.credit_card_code,params.credit_card_type=$scope.buyer.cardType,params.expire_year=$scope.buyer.credit_card_expired.year,params.expire_month=$scope.buyer.credit_card_expired.month,params.credit_card_number=$scope.buyer.credit_card_number,$scope.buyer.remember&&(params.is_store_this_card=$scope.buyer.remember))),$valid&&(("paypal"===type||"card"===type)&&(params.payment_gateway_id=ConstPaymentGateways.PayPal),"pro_account"===$state.params["class"]?params["class"]="ProUser":"top_user"===$state.params["class"]?params["class"]="TopUser":params["class"]="Appointment",1===parseInt($state.params.is_bonus)&&(params.is_bonus=1),params.foreign_id=$state.params.id,$scope.paynow_is_disabled=!0,PaymentOrder.post(params,function(response){var flashMessage;0===response.error.code?(void 0!==response.redirect_url?$window.location.href=response.redirect_url:void 0!==response.data.gateway_callback_url?$window.location.href=response.data.gateway_callback_url:"Pending"===response.data.status?(flashMessage=$filter("translate")("Your request is in pending."),flash.set(flashMessage,"error",!1),$state.reload()):"Captured"===response.data.status?(flashMessage=$filter("translate")("Amount added successfully."),flash.set(flashMessage,"success",!1),$state.reload()):0===response.error.code?("Captured"===response.payment_response.status&&($scope.my_user.available_wallet_amount=$scope.my_user.available_wallet_amount-parseInt(response.data.total_listing_fee)),flashMessage=$filter("translate")("Payment successfully completed."),flash.set(flashMessage,"success",!1)):512===response.error.code&&(flashMessage=$filter("translate")("Process Failed. Please, try again."),flash.set(flashMessage,"error",!1)),"appointments"===$state.params["class"]?$state.go("MyBooking"):$state.go("user_dashboard")):($scope.errorMessage=$filter("translate")("We are unable to process your request. Please try again."),response.error.fields&&angular.forEach(response.error.fields,function(value){$scope.errorMessage=$scope.errorMessage+" "+value.issue}),flashMessage=$filter("translate")($scope.errorMessage),flash.set(flashMessage,"error",!1)),$scope.paynow_is_disabled=!1}))},$scope.showCardDetail=function(){$("#showCardDetail").slideDown("slow"),$scope.buyer.selected_card=""},$scope.hideCardDetail=function(){$scope.credit_card_details.length>0&&$("#showCardDetail").slideUp("fast")},$scope.clearSelectedCard=function(){$scope.buyer.selected_card=""}},$scope.payNowPayPalClick=function(){},$scope.index()}),angular.module("hirecoworkerApp").factory("PaymentGatewaySingle",["$resource",function($resource){return $resource("/api/v1/payment_gateway_settings/:id",{id:"@id"},{get:{method:"GET"}})}]).factory("PaymentGatewayList",["$resource",function($resource){return $resource("/api/v1/payment_gateways/list",{},{get:{method:"GET"}})}]).factory("PaymentOrder",["$resource",function($resource){return $resource("/api/v1/order",{},{post:{method:"POST"}})}]),angular.module("hirecoworkerApp.PaymentBooking").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/PaymentBooking/PaymentBooking/views/gateway.html",'
    {{\'Review your booking details for\' | translate}}
    {{appointmentInfo.provider_user.user_profile.first_name}} {{appointmentInfo.provider_user.user_profile.last_name}}
    {{\'Booking for\' | translate}}
    {{appointmentInfo.appointment_from_date | date : \'dd-MM-yyyy\'}} - {{appointmentInfo.appointment_to_date | date : \'dd-MM-yyyy\'}} ({{appointmentInfo.appointment_from_time}}-{{appointmentInfo.appointment_to_time}})
    {{\'Payment Note\' | translate}}
    {{appointmentInfo.bonus_amount_note}}
    {{\'Total amount to pay\' | translate}}
    {{Booking_amount | currency : currency_type}}
    {{$root.settings.PRO_ACCOUNT_FEE | currency : currency_type}}
    {{\'Your current balance affiliate earned amount\' | translate}}
    {{appointmentInfo.user.affiliate_pending_amount | currency: currency_type}}
    {{\'Total payable amount\' | translate}}
    {{total_amount |currency : currency_type}}
    {{\'After this booking your balance affiliate amount\' | translate}}
    {{total_affiliate_amount | currency : currency_type}}

    {{"Please Select Card"| translate}}

    {{card.name_on_the_card}}

    {{card.masked_card_number}}

    {{\'Expires:\'|translate}} {{card.credit_card_expire}}

    {{"Try Another Card"|translate}}
    {{\'Required\'|translate}}
    {{\'Please enter valid credit card number\'|translate}}
    {{\'Required\'|translate}}
    {{\'Please enter valid expiry date\'|translate}}
    {{\'Required\'|translate}}
    {{\'Required\'|translate}}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.PaymentBooking');"use strict";angular.module("hirecoworkerApp.ProUser",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("ProUser",{url:"/become_a_pro_user",templateUrl:"scripts/plugins/ProUser/ProUser/views/become_a_pro_user.html",controller:"ProUserController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("ProUserController",function($scope){}),angular.module("hirecoworkerApp.ProUser").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/ProUser/ProUser/views/become_a_pro_user.html",'

    {{\'Become a PRO User\' | translate}}

    {{\'Once the user falls in the PRO category, then they suppose to pay a one time fee. As soon as the one time fee paid by the user who wants to represent themselves as a PRO, admin will evaluate their credibility then finally approve the user as PRO.\' | translate}}

    {{\'After that the PRO user will be listed right below the top rated user when there is a search encounters.\' | translate}}

    {{\'Become a PRO User Now\' | translate}}

    {{$root.settings.PRO_ACCOUNT_FEE | currency : currency_type}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.ProUser');"use strict";angular.module("hirecoworkerApp.TopUser",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("TopUser",{url:"/become_a_top_user",templateUrl:"scripts/plugins/TopUser/TopUser/views/become_a_top_user.html",controller:"TopUserController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("TopUserController",function($scope){}),angular.module("hirecoworkerApp.TopUser").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/TopUser/TopUser/views/become_a_top_user.html",'

    {{\'Become a Top Listed Service\' | translate}}

    {{\'Top listed users are the one who will be listed in the very first in the search result.\' | translate}}

    {{\'If a user wants to mount themselves in the top rated section, then they have to pay a monthly fee to site. As a result, user can be turned out to be a top rated user with the validity period mentioned and therefore the user will get displayed in the top listed right above the PRO user.\' | translate}}

    {{\'Become a Top Listed Now\' | translate}}

    {{$root.settings.TOP_LISTED_ACCOUNT_FEE | currency : currency_type}}

    {{\'Validity:\' | translate}} {{$root.settings.TOP_LISTING_EXPIRY_DAYS}} {{\'days\' | translate}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.TopUser');"use strict";angular.module("hirecoworkerApp.SaveSearchAndNotify",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("SavedSearches",{url:"/saved-searches",templateUrl:"scripts/plugins/SaveSearchAndNotify/SaveSearchAndNotify/views/save_search_home.html",controller:"SaveSearchHome",resolve:getToken})}),angular.module("hirecoworkerApp").controller("SaveSearchHome",function($scope,GetMeSavedSearches,$rootScope,$cookies,$state,SavedSearches,SweetAlert,$filter,flash,FormField,$uibModal,$uibModalStack,Services,$location){$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$scope.cities=[],$scope.locations=[],$scope.IsAddressPlaceChange=!0,$rootScope.settings.ALLOWED_SERVICE_LOCATIONS&&($scope.locations=JSON.parse($rootScope.settings.ALLOWED_SERVICE_LOCATIONS),angular.forEach($scope.locations.allowed_countries,function(value){$scope.country.push(value.iso2)}),angular.forEach($scope.locations.allowed_cities,function(value){$rootScope.cities.push(value.name)})),$scope.currentPage=1,$scope.lastPage=1,$rootScope.subHeader="Saved searches",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Saved Searches");var params={};$scope.edit_search={},$scope.getSavedSearches=function(){$scope.skipvalue=void 0!==$scope.itemsPerPage?($scope.currentPage-1)*$scope.itemsPerPage:0,$scope.itemsPerPage=void 0!==$scope.itemsPerPage?$scope.itemsPerPage:0,params.filter={limit:$scope.itemsPerPage,skip:$scope.skipvalue,include:{0:"service"}},GetMeSavedSearches.get(params,function(response){$scope.ListSavedSearches=response.data,response._metadata&&($scope.currentPage=response._metadata.current_page,$scope.lastPage=response._metadata.last_page,$scope.itemsPerPage=response._metadata.per_page,$scope.totalRecords=response._metadata.total)})},$scope.getSavedSearches(),$scope.paginate=function(currentPage){$scope.currentPage=currentPage,$scope.getSavedSearches()},params={},$scope.updateSavedSearches=function(notify_type_id,searchId){params.id=searchId,params.notification_type_id=notify_type_id,SavedSearches.put(params,function(response){0===response.error.code&&flash.set($filter("translate")("Notification setting changed successfully."),"success",!1)})},$scope.editSavedSearch=function(response){$scope.edit_search=response,params={},params.filter=' {"where":{"OR":[{"AND":{"class":"Service","foreign_id":'+$state.params.service_id+'}},{"AND":{"class":"Category","foreign_id":'+$scope.category+'}}],"is_enable_this_field_in_search_form":1},"include":{"0":"input_types"}}',FormField.get(params,function(Formresponse){$scope.form_fields=Formresponse.data,$scope.form_field_submissions=JSON.parse(response.form_field_submissions);var dummy,temp;$scope.save_search_form_field_submissions=[],angular.forEach($scope.form_field_submissions,function(value){angular.forEach(value,function(child_value,key){dummy=key.split("_"),$scope.form_field_id=dummy[dummy.length-1],angular.forEach($scope.form_fields,function(form_value){parseInt(form_value.id)===parseInt($scope.form_field_id)&&(temp={},temp.name=$filter("translate")(form_value.label),temp.value=child_value,$scope.save_search_form_field_submissions.push(temp))})})}),$uibModal.open({animation:!0,ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",templateUrl:"editSaveSearch.html",size:"lg",scope:$scope,controller:function(){$scope.modalClose=function(){$uibModalStack.dismissAll()}}})})},$scope.deleteSavedSearches=function(searchId){SweetAlert.swal({title:$filter("translate")("Are you sure you want to delete?"),text:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Delete",cancelButtonText:"Cancel",closeOnConfirm:!0,animation:!1},function(isConfirm){isConfirm&&(params={},params.id=searchId,SavedSearches["delete"](params,function(response){0===response.error.code&&$state.reload()}))})},$scope.updateModalSaveSearch=function(){params={},params.id=$scope.edit_search.id,params.name=$scope.edit_search.name,params.notification_type_id=$scope.edit_search.notification_type_id,SavedSearches.put(params,function(response){0===response.error.code&&($uibModalStack.dismissAll(),flash.set($filter("translate")("Search updated successfully."),"success",!1))})},params={},params.filter='{"where":{"is_active":1},"limit":100,"skip":0}',Services.get(params).$promise.then(function(response){$scope.services=response.data}),$scope.location=function(){$scope.IsAddressPlaceChange=!1,void 0!==$scope.address?(angular.forEach($scope.address.address_components,function(value){("locality"===value.types[0]||"administrative_area_level_2"===value.types[0])&&(console.log(value),$scope.cityName=value.long_name),"country"===value.types[0]&&($scope.countryName=value.long_name,$scope.country_iso2=value.short_name)}),$scope.address.address_components&&($scope.ne_latitude=$scope.address.geometry.viewport.f.f,$scope.ne_longitude=$scope.address.geometry.viewport.b.f,$scope.sw_latitude=$scope.address.geometry.viewport.f.b,$scope.sw_longitude=$scope.address.geometry.viewport.b.b,$scope.form_longitude=$scope.address.geometry.location.lng(),$scope.form_latitude=$scope.address.geometry.location.lat(),$scope.address=$scope.address.formatted_address,$scope.IsAddressPlaceChange=!0)):$scope.IsAddressPlaceChange=!0},$scope.homesearch=function($valid,formname){return formname.$valid?void($valid&&($scope.cities.length>0?$scope.allowedplace=-1===$scope.cities.indexOf($scope.cityName)?!0:!1:$scope.allowedplace=!1,$scope.countryName===$scope.form_address&&void 0!==$scope.form_address?$scope.zoom=4:$scope.countryName!==$scope.form_address&&void 0!==$scope.form_address?$scope.zoom=10:void 0===$scope.form_address&&($scope.zoom=1),$scope.allowedplace===!1&&$location.path("/users").search({latitude:$scope.form_latitude,longitude:$scope.form_longitude,sw_latitude:$scope.sw_latitude,sw_longitude:$scope.sw_longitude,ne_latitude:$scope.ne_latitude,ne_longitude:$scope.ne_longitude,address:$scope.address,service_id:$scope.service_id,page:1,iso2:$scope.country_iso2,zoom:$scope.zoom,is_search:!1}))):(angular.element("[name='"+formname.$name+"']").find(".ng-invalid:visible:first").focus(),!1)}}),angular.module("hirecoworkerApp").factory("GetSavedSearches",["$resource",function($resource){return $resource("/api/v1/user_searches/:id",{id:"@id"},{get:{method:"GET"}})}]).factory("GetMeSavedSearches",["$resource",function($resource){return $resource("/api/v1/me/user_searches",{},{get:{method:"GET"}})}]).factory("SavedSearches",["$resource",function($resource){return $resource("/api/v1/user_searches/:id",{id:"@id"},{put:{method:"PUT"},"delete":{method:"DELETE"}})}]).factory("PostSavedSearches",["$resource",function($resource){return $resource("/api/v1/user_searches",{},{post:{method:"POST"}})}]),angular.module("hirecoworkerApp.SaveSearchAndNotify").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/SaveSearchAndNotify/SaveSearchAndNotify/views/save_search_home.html",'

    {{\'Pick up where you left off\'|translate}}

    {{\'Open Searches\'|translate}}

    {{\'You haven\\\'t saved any searches.\'| translate}}
    {{\'When you start a new search, remember to select "Save Search" to find it here.\' |translate}}

    {{search.name}}

    {{\'Saved\' | translate}} {{search.created_at| timeago}}

    {{\'Start a new search\' | translate}}

    {{\'Select service\'| translate }}
    {{\'Enter Address\'| translate }}
    {{\'Enter Allowed Locations\' | translate}}
    {{\'Please choose address from autocomplete.\' | translate}}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.SaveSearchAndNotify');"use strict";angular.module("hirecoworkerApp.Mailchimp",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Mailchimp');"use strict";angular.module("hirecoworkerApp.BlockedUser",[]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("BlockUser",{url:"/blocked_users",templateUrl:"scripts/plugins/BlockedUser/BlockedUser/views/block_user.html",controller:"BlockUserController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("BlockUserController",function($scope,$rootScope,contact,$filter,flash,$state,$location,$cookies,GetBlockUser,md5,$window,DeleteBlockUser){$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$scope.currentPage=1,$scope.lastPage=1,$rootScope.subHeader="Blocked User",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader();var params={};$scope.getBlockedUsers=function(){params={},$scope.skipvalue=void 0!==$scope.itemsPerPage?($scope.currentPage-1)*$scope.itemsPerPage:0,$scope.itemsPerPage=void 0!==$scope.itemsPerPage?$scope.itemsPerPage:0,params.filter='{"limit":'+$scope.itemsPerPage+',"skip":'+$scope.skipvalue+',"where":{"user_id":'+$rootScope.auth.id+'},"include":{"1":"blocked_user.attachment","2":"blocked_user.user_profile"}}',GetBlockUser.get(params,function(response){$scope.blockedUsers=response.data,angular.isDefined(response._metadata)&&($scope.totalRecords=response._metadata.total,$scope.itemsPerPage=1,$scope.lastPage=response._metadata.last_page,$scope.currentPage=response._metadata.current_page),angular.forEach($scope.blockedUsers,function(value){if(angular.isDefined(value.blocked_user.attachment)&&null!==value.blocked_user.attachment){var hash=md5.createHash(value.blocked_user.attachment["class"]+value.blocked_user.attachment.id+"pngbig_thumb");value.user_image="images/big_thumb/"+value.blocked_user.attachment["class"]+"/"+value.blocked_user.attachment.id+"."+hash+".png"}else $rootScope.auth.userimage=$window.theme+"images/default.png"})})},$scope.init=function(){$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Blocked Users"),$scope.getBlockedUsers()},$scope.unblockUser=function(id,index){params={},params.blockedUserId=id,DeleteBlockUser["delete"](params,function(response){0===response.error.code&&(flash.set($filter("translate")("User unblocked successfully. "),"success",!1),$scope.blockedUsers.splice(index,1))})},$scope.init(),$scope.paginate=function(currentPage){$scope.currentPage=currentPage,$scope.getBlockedUsers()}}),angular.module("hirecoworkerApp").directive("blockUser",function(){return{restrict:"EA",scope:!0,template:' ',controller:function($scope,$rootScope,$stateParams,BlockUser,$cookies,DeleteBlockUser,flash,$filter){$cookies.getObject("auth")&&($scope.auth_user_detail=$cookies.getObject("auth")),$scope.buttonText=$filter("translate")("Blocked"),$scope.changeText=function(type){1===type?$scope.buttonText=$filter("translate")("Unblock"):$scope.buttonText=$filter("translate")("Blocked")};var params={};$scope.blockUser=function(){params={},params.blocked_user_id=$stateParams.user_id,BlockUser.post(params,function(response){0===response.error.code&&($scope.user.blocking=response.data,flash.set($filter("translate")("User blocked successfully."),"success",!1),$scope.Authuser={id:$scope.auth_user_detail.id,username:$scope.auth_user_detail.username,role_id:$scope.auth_user_detail.role_id,refresh_token:$scope.auth_user_detail.refresh_token,attachment:$scope.auth_user_detail.attachment,is_profile_updated:$scope.auth_user_detail.is_profile_updated,affiliate_pending_amount:$scope.auth_user_detail.affiliate_pending_amount,category_id:$scope.auth_user_detail.category_id,user_profile:$scope.auth_user_detail.user_profile,blocked_user_count:1},$cookies.put("auth",JSON.stringify($scope.Authuser),{path:"/"}),$rootScope.auth=JSON.parse($cookies.get("auth")))})},$scope.unlockUser=function(id){params={},params.blockedUserId=id,DeleteBlockUser["delete"](params,function(response){0===response.error.code&&($scope.user.blocking=null,flash.set($filter("translate")("User unblocked successfully."),"success",!1))})}}}}),angular.module("hirecoworkerApp").factory("BlockUser",["$resource",function($resource){return $resource("/api/v1/blocked_users",{},{post:{method:"POST"}})}]).factory("GetBlockUser",["$resource",function($resource){return $resource("/api/v1/blocked_users",{},{get:{method:"GET"}})}]).factory("DeleteBlockUser",["$resource",function($resource){return $resource("/api/v1/blocked_users/:blockedUserId",{blockedUserId:"@blockedUserId"},{"delete":{method:"DELETE"}})}]),angular.module("hirecoworkerApp.BlockedUser").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/BlockedUser/BlockedUser/views/block_user.html",'

    {{\'Blocked Users\' | translate}}

    • {{data.blocked_user.user_profile.first_name}} {{data.blocked_user.user_profile.last_name}}

      {{data.blocked_user.email}}

      {{data.blocked_user.mobile_code}} {{data.blocked_user.user_profile.phone}}

      {{data.blocked_user.address}}

    • {{\'No blocked users found\' | translate}}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.BlockedUser');"use strict";angular.module("hirecoworkerApp.Request",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("JobPost",{url:"/job-post",templateUrl:"scripts/plugins/Request/Request/views/job_post_home.html",controller:"RequestController",resolve:getToken}).state("jobs",{url:"/jobs?latitude&longitude&sw_latitude&sw_longitude&ne_latitude&ne_longitude&service_id&appointment_from_date&appointment_to_date&address&display_type&page&couple_select&zoom&more&iso2&radius&search_type",templateUrl:"scripts/plugins/Request/Request/views/job_board.html",controller:"JobBoardController",resolve:getToken}).state("JobListing",{url:"/my_jobs",templateUrl:"scripts/plugins/Request/Request/views/job_list_home.html",controller:"RequestListController",resolve:getToken}).state("JobView",{url:"/job/{job_id}",templateUrl:"scripts/plugins/Request/Request/views/job_view.html",controller:"JobViewController",resolve:getToken}).state("JobEdit",{url:"/job/{job_id}/edit",templateUrl:"scripts/plugins/Request/Request/views/job_post_home.html",controller:"RequestController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("JobBoardController",function($scope,$location,$window,$rootScope,$filter,NgMap,$state,$timeout,$cookies,UsersFactory,md5,ConstListingStatus,ConstService,JobRequestGet,ConstBookingType,Service,CategoryService,RequestStatusId,JobTypeId,ConstAppintmentTimingType,ConstPaymentType,ExpressInterest,flash,RemoveInterest,SweetAlert){function pageRedirect(linkvalue){var fulUrl=$location.absUrl(),splitUrl=fulUrl.split("?");window.location.href=splitUrl[0]+"?"+linkvalue}$rootScope.isHome=!0,$rootScope.JobTypeId=JobTypeId,$rootScope.AppointmentTimingType=ConstAppintmentTimingType,$rootScope.ConstPaymentType=ConstPaymentType,$scope.currentPage=1,$scope.lastPage=1,$scope.enableRadius=!1,$scope.options={};var params={};$scope.buttonText="Already applied",$scope.submission=[],$scope.options.singleDatePicker=!0,$rootScope.allowedplace=!1,$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$rootScope.subHeader="Job Board",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$scope.ConstService=ConstService,$scope.is_came=!1,$rootScope.makePlaceTrue=function(){$rootScope.allowedplace=!1},$scope.showLoader=!0,$rootScope.ListingStatus=ConstListingStatus,$scope.page=1,$scope.searchplace=$location.path("/jobs").search().address,$location.path("/jobs").search().zoom&&$scope.searchplace||($scope.zoomLevel=1),$scope.data={},null!==$cookies.get("map_label")&&"true"===$cookies.get("map_label")&&($scope.data.map_label=!0),$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Job Board"),$scope.ConstBookingType=ConstBookingType,$scope.init=function(){$scope.pageRedirect=pageRedirect},$scope.mindate=new Date,$scope.radiusData=[{value:0,text:$filter("translate")("Please select distance")},{value:10,text:$filter("translate")("within 10 km")},{value:20,text:$filter("translate")("within 20 km")},{value:50,text:$filter("translate")("within 50 km")},{value:100,text:$filter("translate")("within 100 km")},{value:200,text:$filter("translate")("within 200 km")},{value:500,text:$filter("translate")("within 500 km")}],$scope.category_page=!0,$location.path("/jobs").search().service_id&&($scope.category_page=!1),$scope.category_page===!0&&($rootScope.is_service_class=$(".section").hasClass("service-names")===!0?!0:!1),$scope.$watch("datePicker",function(date){date&&(date.endDate?($scope.form_to_date=$filter("date")(date.endDate._d,"yyyy-MM-dd"),$scope.form_date=$filter("date")(date.startDate._d,"yyyy-MM-dd")):($scope.form_date=$filter("date")(date._d,"yyyy-MM-dd"),$scope.form_to_date=$rootScope.start_date))}),$scope.$watch("form_address",function(oldvalue,newvalue){$rootScope.form_address=newvalue});var temp={};$scope.category={},temp.filter='{"where":{"is_active":1},"include":{"category":{"whereHas":{"is_active":1}},"0":"category.form_field_groups.form_fields.input_types","category.form_field_groups.form_fields":{"where":{"is_enable_this_field_in_search_form":1}}}}',Service.get(temp,function(response){$scope.services=[],$scope.servicing=response.data,angular.forEach($scope.servicing,function(value){$scope.services.push(value)})}),$scope.search_change=function(value){(null===value||void 0===value||""===value)&&($rootScope.form_address=void 0)},$scope.placeChanged=function(form_address){""!==form_address&&null!==form_address&&void 0!==form_address?($scope.enableRadius=!0,$scope.data.selectedRadius=50):($scope.enableRadius=!1,$scope.data.selectedRadius=0)},$scope.homesearch=function(){$scope.searchplace=$rootScope.form_address,$rootScope.cities.length>1?$rootScope.allowedplace=-1===$rootScope.cities.indexOf($rootScope.cityName)?!0:!1:$rootScope.allowedplace=!1,$rootScope.allowedplace===!1&&($scope.form_field_submissions=[],angular.forEach($scope.submission,function(submit_value){angular.forEach($scope.form_fields_all,function(childvalue){if(submit_value[0]&&""!==submit_value[0].value&&parseInt(submit_value[0].id)===parseInt(childvalue.id)){var temp={};childvalue.dummy_name="f_f_"+childvalue.id,temp[childvalue.dummy_name]=submit_value[0].value,$scope.form_field_submissions.push(temp)}})}),$scope.temp=JSON.stringify($scope.form_field_submissions),$scope.searchplace?$rootScope.countryName===$scope.searchplace?$scope.zoom=4:$rootScope.countryName!==$scope.searchplace&&($scope.zoom=10):$location.path("/jobs").search({service_id:$scope.service_id,display_type:$scope.display_type,page:$scope.page,zoom:1,radius:$scope.data.selectedRadius}),$scope.searchplace&&$location.path("/jobs").search({latitude:$rootScope.form_latitude,longitude:$rootScope.form_longitude,sw_latitude:$rootScope.sw_latitude,sw_longitude:$rootScope.sw_longitude,ne_latitude:$rootScope.ne_latitude,ne_longitude:$rootScope.ne_longitude,service_id:$scope.service_id,appointment_from_date:$scope.form_date,appointment_to_date:$scope.form_to_date,address:$rootScope.form_address,display_type:$scope.display_type,page:$scope.page,zoom:$scope.zoom,more:$scope.temp,iso2:$rootScope.country_iso2,radius:$scope.data.selectedRadius}))},$scope.loadServices=function(category_id){CategoryService.get({id:category_id}).$promise.then(function(response){$scope.serviceLists=response.services})},$scope.init=function(){},$scope.service_change=function(index){$scope.checked=$scope.services[index].checked,$scope.checked===!0?(angular.forEach($scope.services,function(value){value.checked=!1}),$scope.services[index].checked=$scope.checked,$scope.services[index].booking_option_id===ConstBookingType.MultipleDate?$scope.options.singleDatePicker=!1:$scope.options.singleDatePicker=!0):$scope.services[index].checked=!0,$scope.homesearch()},$scope.searchUsers=function(){$scope.loader=!0,$scope.NoRecords=!1,params={},$scope.skipvalue=void 0!==$scope.itemsPerPage?($scope.currentPage-1)*$scope.itemsPerPage:0,$scope.itemsPerPage=void 0!==$scope.itemsPerPage?$scope.itemsPerPage:20,params.filter={limit:$scope.itemsPerPage,skip:$scope.skipvalue,order:"id desc"},params.filter.include={},params.filter.where={request_status_id:RequestStatusId.Open},$location.search().service_id&&(params.filter.where.service_id=$location.search().service_id),params.filter.include[0]="user.attachment",params.filter.include[1]="user.user_profile",params.filter.include[2]="form_field_submission.form_field.form_field_group",params.filter.include[3]="current_user_interest",params.filter.include[4]="service",null!==$rootScope.cityName&&void 0!==$rootScope.cityName||null!==$rootScope.stateName&&void 0!==$rootScope.stateName?(params.latitude=$location.search().latitude,params.longitude=$location.search().longitude,params.listing_sw_latitude=$location.search().sw_latitude,params.listing_sw_longitude=$location.search().sw_longitude,params.listing_ne_latitude=$location.search().ne_latitude,params.listing_ne_longitude=$location.search().ne_longitude):$location.search().iso2&&(delete params.latitude,delete params.longitude,delete params.listing_sw_latitude,delete params.listing_sw_longitude,delete params.listing_ne_longitude,delete params.listing_ne_latitude,params.filter.include["user_profile.listing_country"]={whereHas:{iso2:$location.search().iso2}}),params.radius=$location.search().radius,params.search_type=$location.search().search_type,params.filter=JSON.stringify(params.filter),JobRequestGet.get(params).$promise.then(function(searchResponse){$scope.loader=!1,$scope.center_lat=void 0!==$location.path("/jobs").search().latitude?$location.path("/jobs").search().latitude:0,$scope.center_lon=void 0!==$location.path("/jobs").search().longitude?$location.path("/jobs").search().longitude:0,$scope.page=searchResponse._metadata.current_page,$scope.searchLists=searchResponse.data,searchResponse._metadata&&($scope.currentPage=searchResponse._metadata.current_page,$scope.lastPage=searchResponse._metadata.last_page,$scope.itemsPerPage=searchResponse._metadata.per_page,$scope.totalRecords=searchResponse._metadata.total),angular.forEach($scope.searchLists,function(value){if(value.appointment_from_date=new Date(value.appointment_from_date),value.appointment_to_date=new Date(value.appointment_to_date),void 0!==value.current_user_interest?value.buttonText=$filter("translate")("Already applied"):value.buttonText=$filter("translate")("Express Interest"),value.user.attachment){var hash=md5.createHash(value.user.attachment["class"]+value.user.attachment.id+"pngbig_thumb");value.requestor_image="images/big_thumb/"+value.user.attachment["class"]+"/"+value.user.attachment.id+"."+hash+".png"}else value.requestor_image=$window.theme+"images/default.png";value.list_of_days=[{id:"sun_search",text:"Sun",checked:!1},{id:"mon_search",text:"Mon",checked:!1},{id:"tue_search",text:"Tue",checked:!1},{id:"wed_search",text:"Wed",checked:!1},{id:"thu_search",text:"Thu",checked:!1},{id:"fri_search",text:"Fri",checked:!1},{id:"sat_search",text:"Sat",checked:!1}]}),angular.forEach($scope.searchLists,function(search_value){angular.forEach(search_value.list_of_days,function(value){"Sun"===value.text?value.checked=1===parseInt(search_value.is_sunday_needed)?!0:!1:"Mon"===value.text?value.checked=1===parseInt(search_value.is_monday_needed)?!0:!1:"Tue"===value.text?value.checked=1===parseInt(search_value.is_tuesday_needed)?!0:!1:"Wed"===value.text?value.checked=1===parseInt(search_value.is_wednesday_needed)?!0:!1:"Thu"===value.text?value.checked=1===parseInt(search_value.is_thursday_needed)?!0:!1:"Fri"===value.text?value.checked=1===parseInt(search_value.is_friday_needed)?!0:!1:"Sat"===value.text&&(value.checked=1===parseInt(search_value.is_saturday_needed)?!0:!1)})}),NgMap.getMap().then(function(map){$scope.map=map}),$scope.positions=[],void 0!==$scope.searchLists&&angular.forEach($scope.searchLists,function(value){value.work_location_latitude&&value.work_location_longitude&&$scope.positions.push({id:value.id,username:value.username,doctor_name:value.first_name+" "+value.last_name,address1:value.address,rating:value.starRating,lat:value.work_location_latitude,lon:value.work_location_longitude})}),$scope.showLoader=!1,$scope.mappositions=$scope.positions})},$scope.clearTime=function(){clearTimeout($(this).data("timeout"))},$scope.Goto=function(event){var id="#user"+this.id,top=$(id).offset().top-80;$("html, body").animate({scrollTop:top},500),$scope.userClickedId=this.id},$scope.zoomChanged=function(){$scope.data.map_label===!0&&($scope.map&&($scope.zoomLevel=$scope.map.getZoom(),$scope.latlng=[$scope.map.getCenter().lat(),$scope.map.getCenter().lng()],$scope.center_lat=$scope.map.getCenter().lat(),$scope.center_lon=$scope.map.getCenter().lng()),$scope.latlng&&$location.path("/users").search({latitude:$scope.map.getCenter().lat(),longitude:$scope.map.getCenter().lng(),sw_latitude:$scope.map.getBounds().f.b,sw_longitude:$scope.map.getBounds().b.b,ne_latitude:$scope.map.getBounds().f.f,ne_longitude:$scope.map.getBounds().b.f,service_id:$location.search().service_id,address:$rootScope.form_address,display_type:$scope.display_type,page:$location.search().page,zoom:$scope.zoomLevel,iso2:$location.search().iso2,radius:$location.search().radius,search_type:"map",user_search_id:$location.search().user_search_id}))},$scope.toggleBounce=function(val){$(this).data("timeout",setTimeout(function(){},500))},$timeout(function(){$scope.form_fields_all=[],$scope.service_id=$location.search().service_id,$scope.form_address=$location.path("/jobs").search().address,$scope.zoomLevel=$location.path("/jobs").search().zoom,$location.path("/jobs").search().address?($scope.data.selectedRadius=void 0!==$location.path("/jobs").search().radius?$location.path("/jobs").search().radius:50,$scope.enableRadius=!0):$scope.data.selectedRadius=0},10),$scope.start_dates=$state.params.start_date,$scope.end_dates=$state.params.end_date,$scope.map_change=function(val){$cookies.put("map_label",val)},$scope.getpos=function(){$scope.zoomLevel=void 0!==$location.path("/jobs").search().zoom?$location.path("/jobs").search().zoom:$scope.map.getZoom(),$scope.data.map_label===!0&&($scope.latlng=[$scope.map.getCenter().lat(),$scope.map.getCenter().lng()],$scope.center_lat=$scope.map.getCenter().lat(),$scope.center_lon=$scope.map.getCenter().lng(),$scope.latlng&&$location.path("/jobs").search({latitude:$scope.map.getCenter().lat(),longitude:$scope.map.getCenter().lng(),sw_latitude:$scope.map.getBounds().f.b,sw_longitude:$scope.map.getBounds().b.b,ne_latitude:$scope.map.getBounds().f.f,ne_longitude:$scope.map.getBounds().b.f,service_id:$location.path("/jobs").search().service_id,address:$rootScope.form_address,display_type:$scope.display_type,page:$location.path("/jobs").search().page,zoom:$scope.zoomLevel,iso2:$location.path("/jobs").search().iso2,radius:$location.path("/jobs").search().radius,search_type:"map"}))},$scope.searchUsers(),$scope.ExpressInterest=function(requestId,index){params={},params.request_id=requestId,ExpressInterest.post(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Successfully Applied."),"success",!1),$scope.searchLists[index].current_user_interest=response,$scope.searchLists[index].buttonText=$filter("translate")("Applied"))})},$scope.RemoveInterest=function(requestId,index){params={},params.requestsUserId=requestId,RemoveInterest["delete"](params,function(response){0===response.error.code&&(flash.set($filter("translate")("Interest removed successfully."),"success",!1),$scope.searchLists[index].current_user_interest=null)})},$scope.paginate_search=function(currentPage){$scope.currentPage=currentPage,$scope.searchUsers($scope.type)},$scope.ChangeButtonText=function(type,index){"Enter"===type?$scope.searchLists[index].buttonText=$filter("translate")("Remove Interest"):$scope.searchLists[index].buttonText=$filter("translate")("Already applied")},$scope.closeJob=function(jobId,index){SweetAlert.swal({title:$filter("translate")("Are you sure you want to close this job?"),text:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"OK",cancelButtonText:"Cancel",closeOnConfirm:!0,animation:!1},function(isConfirm){isConfirm&&(params={},params.requestId=jobId,params.request_status_id=RequestStatusId.Closed,JobRequestGet.put(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Successfully Closed."),"success",!1),$scope.searchLists.splice(index,1))}))})},$scope.editJob=function(id){$state.go("JobEdit",{job_id:id})}}).directive("convertToNumber",function(){return{require:"ngModel",link:function(scope,element,attrs,ngModel){ngModel.$parsers.push(function(val){return val?parseInt(val,10):null}),ngModel.$formatters.push(function(val){return val?""+val:""})}}}),angular.module("hirecoworkerApp").controller("RequestListController",["$scope","$rootScope","$window","$filter","$state","$timeout","$cookies","Category","UsersFactory","$builder","$validator","Country","ConstBookingType","JobRequestMe","JobRequestGet","JobRequestPost","JobTypeId","RequestStatusId","md5","ConstAppintmentTimingType","ConstPaymentType","flash","SweetAlert",function($scope,$rootScope,$window,$filter,$state,$timeout,$cookies,Category,UsersFactory,$builder,$validator,Country,ConstBookingType,JobRequestMe,JobRequestGet,JobRequestPost,JobTypeId,RequestStatusId,md5,ConstAppintmentTimingType,ConstPaymentType,flash,SweetAlert){$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$rootScope.pageTitle=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("My Posted Jobs"),$scope.job_type="Open Jobs",$scope.RequestStatusId=RequestStatusId,$rootScope.subHeader="Post a Job",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$rootScope.JobTypeId=JobTypeId,$rootScope.AppointmentTimingType=ConstAppintmentTimingType,$rootScope.ConstPaymentType=ConstPaymentType,$scope.currentPage=1,$scope.lastPage=1,$scope.request_status_id=1,$scope.jobTypes=[{id:$scope.RequestStatusId.Open,text:$filter("translate")("Open Jobs")},{id:$scope.RequestStatusId.Closed,text:$filter("translate")("Closed Jobs")}];var params={};$scope.getJobList=function(request_status_id){$scope.RequestStatusId.Open===parseInt(request_status_id)?$scope.job_type="Open Jobs":$scope.job_type="Closed Jobs",params={},$scope.skipvalue=void 0!==$scope.itemsPerPage?($scope.currentPage-1)*$scope.itemsPerPage:0,$scope.itemsPerPage=void 0!==$scope.itemsPerPage?$scope.itemsPerPage:0,params.filter={limit:$scope.itemsPerPage,skip:$scope.skipvalue,order:"id desc"},params.filter.include={},params.filter.include[0]="user.attachment",params.filter.include[1]="user.user_profile",params.filter.include[2]="user.form_field_submission.form_field.form_field_group",params.filter.include[3]="service",params.filter.include[4]="requests_users.user.attachment",params.filter.include[5]="requests_users.user.user_profile",params.filter.where={request_status_id:request_status_id},params.filter=JSON.stringify(params.filter),JobRequestMe.get(params,function(response){$scope.jobList=response.data,response._metadata&&($scope.currentPage=response._metadata.current_page,$scope.lastPage=response._metadata.last_page,$scope.itemsPerPage=response._metadata.per_page,$scope.totalRecords=response._metadata.total),angular.forEach($scope.jobList,function(value){if(value.appointment_from_date=new Date(value.appointment_from_date),value.appointment_to_date=new Date(value.appointment_to_date),value.user.attachment){var hash=md5.createHash(value.user.attachment["class"]+value.user.attachment.id+"pngbig_thumb");value.requestor_image="images/big_thumb/"+value.user.attachment["class"]+"/"+value.user.attachment.id+"."+hash+".png"}else value.requestor_image=$window.theme+"images/default.png";value.list_of_days=[{id:"sun_search",text:"Sun",checked:!1},{id:"mon_search",text:"Mon",checked:!1},{id:"tue_search",text:"Tue",checked:!1},{id:"wed_search",text:"Wed",checked:!1},{id:"thu_search",text:"Thu",checked:!1},{id:"fri_search",text:"Fri",checked:!1},{id:"sat_search",text:"Sat",checked:!1}]}),angular.forEach($scope.jobList,function(value){if(angular.forEach(value.requests_users,function(child_value){if(child_value.user.attachment){var hash=md5.createHash(child_value.user.attachment["class"]+child_value.user.attachment.id+"pngnormal_thumb");child_value.interestor_image="images/normal_thumb/"+child_value.user.attachment["class"]+"/"+child_value.user.attachment.id+"."+hash+".png"}else child_value.interestor_image=$window.theme+"images/default.png"}),value.requests_user_count<6)for(var i=value.requests_user_count;6>i;i++)value.requests_users[i]={id:0}}),angular.forEach($scope.jobList,function(search_value){angular.forEach(search_value.list_of_days,function(value){"Sun"===value.text?value.checked=1===parseInt(search_value.is_sunday_needed)?!0:!1:"Mon"===value.text?value.checked=1===parseInt(search_value.is_monday_needed)?!0:!1:"Tue"===value.text?value.checked=1===parseInt(search_value.is_tuesday_needed)?!0:!1:"Wed"===value.text?value.checked=1===parseInt(search_value.is_wednesday_needed)?!0:!1:"Thu"===value.text?value.checked=1===parseInt(search_value.is_thursday_needed)?!0:!1:"Fri"===value.text?value.checked=1===parseInt(search_value.is_friday_needed)?!0:!1:"Sat"===value.text&&(value.checked=1===parseInt(search_value.is_saturday_needed)?!0:!1)})})})},$scope.getJobList($scope.RequestStatusId.Open),$scope.closeJob=function(jobId,index){SweetAlert.swal({title:$filter("translate")("Are you sure you want to close this job?"),text:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"OK",cancelButtonText:"Cancel",closeOnConfirm:!0,animation:!1},function(isConfirm){isConfirm&&(params={},params.requestId=jobId,params.request_status_id=RequestStatusId.Closed,JobRequestGet.put(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Successfully Closed."),"success",!1),$scope.jobList[index].request_status_id=RequestStatusId.Closed)}))})},$scope.gotoSearch=function(request_job){$scope.form_field_submissions=[],angular.forEach(request_job.form_field_submission,function(value){var temp={};value.dummy_name="f_f_"+value.form_field_id,temp[value.dummy_name]=value.response,$scope.form_field_submissions.push(temp)}),$state.go("search",{latitude:request_job.work_location_latitude,longitude:request_job.work_location_longitude,sw_latitude:request_job.work_location_sw_latitude,sw_longitude:request_job.work_location_sw_longitude,ne_latitude:request_job.work_location_ne_latitude,ne_longitude:request_job.work_location_ne_longitude,service_id:request_job.service_id,appointment_from_date:moment(request_job.appointment_from_date).format("YYYY-MM-DD"),appointment_to_date:moment(request_job.appointment_to_date).format("YYYY-MM-DD"),address:request_job.work_location_address,more:JSON.stringify($scope.form_field_submissions),page:1,zoom:10,radius:50,request_id:request_job.id})},$scope.paginate_search=function(currentPage){$scope.currentPage=currentPage,$scope.getJobList($scope.request_status_id)}}]),angular.module("hirecoworkerApp").controller("RequestController",["$scope","$rootScope","$window","$filter","$state","$timeout","$cookies","Category","UsersFactory","$builder","$validator","Country","ConstBookingType","JobRequestPost","RequestStatusId","JobTypeId","ConstAppintmentTimingType","flash","ConstPaymentType","JobRequestGet",function($scope,$rootScope,$window,$filter,$state,$timeout,$cookies,Category,UsersFactory,$builder,$validator,Country,ConstBookingType,JobRequestPost,RequestStatusId,JobTypeId,ConstAppintmentTimingType,flash,ConstPaymentType,JobRequestGet){$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$rootScope.subHeader="Post a job",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),$scope.BookingType=ConstBookingType,$scope.is_job_edit=!1,$scope.show_submit=!1,$scope.oneTime=!0,$scope.regular=!1,$scope.home=!1,$scope.showService=!0,$scope.serviceSelected=!1,$scope.overnight_booking=!1,$scope.same_day_booking=!0,$scope.about_user=!1,$scope.timeError=!1,$scope.rateError=!1,$rootScope.JobTypeId=JobTypeId,$scope.dayTimeError=!1,$scope.booking_time={start:moment("18:00:00","HH:mm:ss"),end:moment("22:00:00","HH:mm:ss")},$scope.request_details={},$scope.paymenttype=[{id:1,name:"pay via credit card"},{id:2,name:"pay cash"}],$scope.time_commitment=[{id:2,name:"Part Time"},{id:3,name:"Full Time"}],$scope.time_type=[{id:0,name:"Please select an option"},{id:1,name:"Specify times"},{id:2,name:"During the day"},{id:3,name:"During the night"}],$scope.request_details.payment_type=ConstPaymentType.ThroughSite,$scope.request_details.job_type_id=JobTypeId.OneTimeJob,$scope.request_details.time_type=0,$scope.fromDate=$scope.toDate=moment(new Date),$scope.request_details.list_of_days=[{id:"sun_regular",text:"Sun",checked:!1},{id:"mon_regular",text:"Mon",checked:!1},{id:"tue_regular",text:"Tue",checked:!1},{id:"wed_regular",text:"Wed",checked:!1},{id:"thu_regular",text:"Thu",checked:!1},{id:"fri_regular",text:"Fri",checked:!1},{id:"sat_regular",text:"Sat",checked:!1}],$scope.services=[];var params={};params.filter='{"where":{"is_active":1},"include":{"2":"service.form_field_groups.form_fields.input_types","service.form_field_groups":{"where":{"is_belongs_to_service_provider":"0"}},"service":{"whereHas":{"is_active":1}},"4":"form_field_groups.form_fields.input_types","form_field_groups":{"where":{"is_belongs_to_service_provider":"0"}}}}',Category.categoryList(params).$promise.then(function(response){$scope.categories=response.data,angular.forEach(response.data,function(value){angular.forEach(value.service,function(childvalue){$scope.services.push(childvalue)})}),$scope.request_details.selected_service_id=$scope.services[0].id}),$scope.country=[],$scope.cities=[],$rootScope.settings.ALLOWED_SERVICE_LOCATIONS&&($scope.locations=JSON.parse($rootScope.settings.ALLOWED_SERVICE_LOCATIONS),angular.forEach($scope.locations.allowed_countries,function(value){$scope.country.push(value.iso2)}),angular.forEach($scope.locations.allowed_cities,function(value){$scope.cities.push(value.name)})),$scope.address_options={types:[],componentRestrictions:{country:$scope.country}},$rootScope.makePlaceTrue=function(){$rootScope.allowedplace=!1},$scope.basis_options={autoApply:!0},params={},params.filter='{"limit":500,"skip":0}',Country.get(params,function(response){$scope.countries=response.data}),$scope.get_service=function(selectedService){$scope.serviceSelected=!0,$scope.showService=!1,$scope.form_data=[],angular.forEach($scope.services,function(service_value){if(parseInt(service_value.id)===parseInt(selectedService)&&($scope.need_location=1===parseInt(service_value.is_need_user_location)?!0:!1,$scope.get_numberof_items=1===parseInt(service_value.is_allow_to_get_number_of_items)?!0:!1,$scope.booking=service_value.booking_option_id,$scope.category_id=service_value.category_id,$scope.selectedServiceName=service_value.name,angular.forEach(service_value.form_field_groups,function(value){value.form_fields.length>0&&$scope.form_data.push(value)}),$scope.get_numberof_items)){$scope.totalCounts=[],$scope.label_value=service_value.label_for_number_of_item;for(var i=0;i0&&$scope.form_data.push(value)})}),$timeout(function(){$scope.selected_serviceId?($scope.selected_serviceId!==selectedService?parseInt($scope.booking)===parseInt($scope.BookingType.MultipleDate)?$scope.fromDate={startDate:moment(new Date),endDate:moment(new Date)}:$scope.fromDate=$scope.toDate=moment(new Date):parseInt($scope.booking)===parseInt($scope.BookingType.MultipleDate)?$scope.fromDate={startDate:void 0!==$scope.request_details.from_date?moment(new Date($scope.request_details.from_date)):moment(new Date),endDate:void 0!==$scope.request_details.to_date?moment(new Date($scope.request_details.to_date)):moment(new Date)}:($scope.fromDate=void 0!==$scope.request_details.from_date?moment(new Date($scope.request_details.from_date)):moment(new Date),$scope.toDate=void 0!==$scope.request_details.to_date?moment(new Date($scope.request_details.to_date)):moment(new Date)),$scope.selected_serviceId=selectedService):$scope.selected_serviceId=selectedService},0),$scope.booking===$scope.BookingType.MultipleDate?$scope.options={autoApply:!0,singleDatePicker:!1}:$scope.options.singleDatePicker=!0,$scope.regular===!0&&"JobEdit"!==$state.current.name&&($scope.toDate=""),$scope.showDateError=!1},$scope.options={minDate:moment(new Date).format("YYYY-MM-DD"),singleDatePicker:!0},$scope.regular_options={minDate:moment(new Date).format("YYYY-MM-DD"),singleDatePicker:!0,autoApply:!0},$scope.get_time_details=function(){if($scope.showDateError=!1,new Date($scope.end_date)ival;ival++)void 0!==$builder.forms["default-"+ival]&&($builder.forms["default-"+ival]=[]);$scope.defaultValue={},$scope.frmvalues=[],$scope.showfrms=[],angular.forEach($scope.form_data,function(form_value){$scope.form_fields=form_value.form_fields,""!==$scope.form_fields&&(angular.forEach($scope.form_fields,function(field_type_response){angular.forEach($scope.request_details.form_field_submission,function(value){$scope.prefillValue=parseInt(value.form_field.id)===parseInt(field_type_response.id)?value.response:""});var option_values;if(field_type_response.options){option_values=field_type_response.options.split(",");for(var i=0;i1?$rootScope.allowedplace=-1===$scope.cities.indexOf($scope.user_profile.listing_city.name)?!0:!1:$rootScope.allowedplace=!1,$rootScope.allowedplace===!1&&$is_valid)){$scope.payment_mode=1===parseInt($scope.request_details.payment_type)?"credit":"cash";var params={};params.service_id=$scope.request_details.selected_service_id,params.request_status_id=RequestStatusId.Open,params.job_type_id=$scope.request_details.job_type_id,params.appointment_from_date=$scope.request_details.from_date,params.appointment_to_date=null!==$scope.request_details.to_date?$scope.request_details.to_date:$scope.request_details.from_date,$scope.BookingType.MultiHours===$scope.booking?(params.appointment_from_time=moment($scope.booking_time.start).format("HH:mm:ss"),params.appointment_to_time=moment($scope.booking_time.end).format("HH:mm:ss")):$scope.BookingType.TimeSlot===$scope.booking?params.appointment_from_time=moment($scope.booking_time.start).format("HH:mm:ss"):(params.appointment_from_time=moment("00:00:00","HH:mm:ss").format("HH:mm:ss"),params.appointment_to_time=moment("23:59:59","HH:mm:ss").format("HH:mm:ss")),params.work_location_address=$scope.request_details.address,params.work_location_address1=null!==$scope.request_details.address1?$scope.request_details.address1:void 0,params.work_location_city=$scope.request_details.city,params.work_location_state=$scope.request_details.state,params.work_location_country=$scope.request_details.country,params.work_location_postal_code=$scope.request_details.postal_code,params.work_location_latitude=$scope.request_details.latitude,params.work_location_longitude=$scope.request_details.longitude,params.work_location_ne_latitude=$scope.request_details.ne_latitude,params.work_location_ne_longitude=$scope.request_details.ne_longitude,params.work_location_sw_latitude=$scope.request_details.sw_latitude,params.work_location_sw_longitude=$scope.request_details.sw_longitude,params.payment_mode_id=1,params.price_per_hour=$scope.request_details.rate,0!==parseInt($scope.request_details.time_type)&&null!==$scope.request_details.time_type&&(params.appointment_timing_type_id=$scope.request_details.time_type),params.number_of_item=$scope.request_details.count,params.description=$scope.request_details.more_details,$scope.request_details.time_type===ConstAppintmentTimingType.SpecifyTimes&&angular.forEach($scope.request_details.list_of_days,function(day){day.checked===!0&&("Sun"===day.text?(params.is_sunday_needed=1,params.sunday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.sunday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Mon"===day.text?(params.is_monday_needed=1,params.monday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.monday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Tue"===day.text?(params.is_tuesday_needed=1,params.tuesday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.tuesday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Wed"===day.text?(params.is_wednesday_needed=1,params.wednesday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.wednesday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Thu"===day.text?(params.is_thursday_needed=1,params.thursday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.thursday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Fri"===day.text?(params.is_friday_needed=1,params.friday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.friday_appointment_to_time=moment(day.end).format("HH:mm:ss")):"Sat"===day.text&&(params.is_saturday_needed=1,params.saturday_appointment_from_time=moment(day.start).format("HH:mm:ss"),params.saturday_appointment_to_time=moment(day.end).format("HH:mm:ss")))}),params.form_field_submissions=[],angular.forEach($scope.request_details.submission,function(submit_value){if(""!==submit_value.value){var temp={};temp[submit_value[0].id]=submit_value[0].value,params.form_field_submissions.push(temp)}}),$scope.errorData=[],$scope.show_submit=!0,"new"===type?JobRequestPost.post(params,function(response){$scope.show_submit=!1,0===response.error.code?(flash.set($filter("translate")("Job Posted Successfully."),"success",!1),$state.go("JobListing")):flash.set($filter("translate")("Please provide valid details"),"error",!0)},function(response){flash.set($filter("translate")(response.data.error.message),"error",!0),response.data&&response.data.error.raw_message.error&&angular.forEach(response.data.error.raw_message.error,function(raw_value){angular.forEach(raw_value,function(errordata){$scope.errorData.push(errordata)})})}):(params.requestId=$state.params.job_id,JobRequestGet.put(params,function(response){$scope.show_submit=!1,0===response.error.code?(flash.set($filter("translate")("Job updated successfully."),"success",!1),$state.go("JobListing")):flash.set($filter("translate")("Please provide valid details"),"error",!0)},function(response){if($scope.show_submit=!1,flash.set($filter("translate")(response.data.error.message),"error",!0),response.data&&(response.data.error.raw_message.error||response.data.error.raw_message)){var temp=response.data.error.raw_message.error||response.data.error.raw_message;angular.forEach(temp,function(raw_value){angular.forEach(raw_value,function(errordata){$scope.errorData.push(errordata)})})}}))}})},$scope.no_address_available=!1,$scope.addresslocationChanged=function(){$scope.IsAddressPlaceChange=!1,void 0!==$scope.request_details.address?($scope.no_address_available=!1,angular.forEach($scope.request_details.address.address_components,function(value){("locality"===value.types[0]||"administrative_area_level_2"===value.types[0])&&($scope.request_details.city={},$scope.request_details.city.name=value.long_name),"administrative_area_level_1"===value.types[0]&&($scope.request_details.state={},$scope.request_details.state.name=value.long_name),"country"===value.types[0]&&($scope.request_details.country={},$scope.request_details.country.iso2=value.short_name,$scope.request_details.country.name=value.long_name,$scope.selectedAddtionalCountry=value.short_name),"postal_code"===value.types[0]&&($scope.request_details.postal_code=parseInt(value.long_name))}),$scope.request_details.address.address_components?($scope.IsAddressPlaceChange=!0,$scope.request_details.latitude=$scope.request_details.address.geometry.location.lat(),$scope.request_details.longitude=$scope.request_details.address.geometry.location.lng(),$scope.request_details.ne_latitude=$scope.request_details.address.geometry.viewport.f.f,$scope.request_details.ne_longitude=$scope.request_details.address.geometry.viewport.b.f,$scope.request_details.sw_latitude=$scope.request_details.address.geometry.viewport.f.b,$scope.request_details.sw_longitude=$scope.request_details.address.geometry.viewport.b.b,$scope.request_details.full_address=$scope.request_details.address.name+" "+$scope.request_details.address.vicinity,$scope.request_details.address=$scope.request_details.address.formatted_address):$scope.no_address_available=!0):$scope.IsAddressPlaceChange=!0},$scope.countChanged=function(count){$scope.booking_count=parseInt(count)+" "+$scope.label_value},$scope.validate_time=function(index){return moment($scope.request_details.list_of_days[index].end).format("HH:mm:ss")<=moment($scope.request_details.list_of_days[index].start).format("HH:mm:ss")||!$scope.booking_time.start||!$scope.booking_time.end?void($scope.dayTimeError=!0):void($scope.dayTimeError=!1)},$scope.about_schedule=function(){if(0!==$scope.request_details.time_type){if($scope.is_various=!1,$scope.is_day_checked=!1,$scope.request_details.from_date=$scope.start_date,$scope.is_null=!1,$scope.request_details.to_date=void 0!==$scope.end_date?$scope.end_date:$scope.start_date,angular.forEach($scope.request_details.list_of_days,function(value){value.checked===!0&&$scope.is_various===!1&&($scope.regular_start=moment(value.start).format("hh:mm a"),$scope.regular_end=moment(value.end).format("hh:mm a"),(null===value.start||void 0===value.start||void 0===value.end||null===value.end)&&($scope.is_null=!0),angular.forEach($scope.request_details.list_of_days,function(child_start_value){child_start_value.checked&&($scope.is_day_checked=!0,moment(value.start).format("HH:mm:ss")===moment(child_start_value.start).format("HH:mm:ss")?$scope.is_various=!1:$scope.is_various=!0)}),$scope.is_various===!1&&angular.forEach($scope.request_details.list_of_days,function(child_end_value){child_end_value.checked&&(moment(value.end).format("HH:mm:ss")===moment(child_end_value.end).format("HH:mm:ss")?$scope.is_various=!1:$scope.is_various=!0)}))}),$scope.is_null===!0)return void($scope.dayTimeError=!0);$scope.about_user=!0,$scope.regular=!1,$scope.is_regular=!0}},$scope.changeRegularTiming=function(){$scope.fromDate=moment($scope.request_details.from_date),$scope.request_details.from_date!==$scope.request_details.to_date&&($scope.toDate=moment($scope.request_details.to_date)),$scope.regular=!0,$scope.about_user=$scope.is_regular=!1},"JobEdit"===$state.current.name&&($scope.is_job_edit=!0,params={},params.requestId=$state.params.job_id,params.filter='{"include":{"0":"user.attachment","1":"user.user_profile","3":"form_field_submission.form_field.form_field_group", "4" : "current_user_interest","5":"service","6":"work_location_city","7":"work_location_state","8":"work_location_country"}}',JobRequestGet.get(params).$promise.then(function(viewResponse){0===viewResponse.error.code&&($timeout(function(){$scope.request_details.selected_service_id=$scope.job.service_id},10),$scope.job=viewResponse.data,$scope.selected_serviceId=$scope.job.service_id,$scope.request_status_id=$scope.job.request_status_id,$scope.request_details.job_type_id=$scope.job.job_type_id,$scope.request_details.from_date=$scope.job.appointment_from_date,$scope.request_details.to_date=$scope.job.appointment_to_date,$scope.booking_time.start=$scope.job.appointment_from_time,$scope.booking_time.end=$scope.job.appointment_to_time,$scope.request_details.address=$scope.job.work_location_address,$scope.request_details.address1=$scope.job.work_location_address1,$scope.request_details.city=$scope.job.work_location_city,$scope.request_details.state=$scope.job.work_location_state,$scope.request_details.country=$scope.job.work_location_country,$scope.selectedAddtionalCountry=$scope.job.work_location_country.iso2,$scope.request_details.postal_code=$scope.job.work_location_postal_code,$scope.request_details.latitude=$scope.job.work_location_latitude,$scope.request_details.longitude=$scope.job.work_location_longitude,$scope.request_details.ne_longitude=$scope.job.work_location_ne_latitude,$scope.request_details.ne_longitude=$scope.job.work_location_ne_longitude,$scope.request_details.sw_latitude=$scope.job.work_location_sw_latitude,$scope.request_details.sw_longitude=$scope.job.work_location_sw_longitude,$scope.request_details.payment_type=$scope.job.payment_mode_id,$scope.request_details.time_type=$scope.job.appointment_timing_type_id,$scope.request_details.rate=$scope.job.price_per_hour,$scope.request_details.count=$scope.job.number_of_item,$scope.request_details.more_details=$scope.job.description,$scope.request_details.form_field_submission=$scope.job.form_field_submission)}))}]),angular.module("hirecoworkerApp").controller("JobViewController",function($scope,$location,$window,$rootScope,$filter,NgMap,$state,$timeout,$cookies,UsersFactory,md5,ConstListingStatus,ConstService,JobRequestGet,ConstBookingType,Service,CategoryService,RequestStatusId,JobTypeId,ConstAppintmentTimingType,ConstPaymentType,flash,ExpressInterest,RemoveInterest,SweetAlert){$rootScope.JobTypeId=JobTypeId,$rootScope.AppointmentTimingType=ConstAppintmentTimingType,$rootScope.ConstPaymentType=ConstPaymentType,$rootScope.RequestStatusId=RequestStatusId,$scope.enableRadius=!1,$scope.buttonText="Already applied",$scope.options={};var params={};$scope.submission=[],$scope.options.singleDatePicker=!0,$rootScope.allowedplace=!1,$rootScope.isAuth&&0===parseInt($rootScope.auth.is_profile_updated)&&$state.go("user_profile",{type:"personal"}),$rootScope.subHeader="Job Board",$cookies.put("subHeader",$rootScope.subHeader),$rootScope.gotoHeader(),params.requestId=$state.params.job_id,params.filter='{"include":{"0":"user.attachment","1":"user.user_profile","3":"form_field_submission.form_field.form_field_group","4":"current_user_interest","5":"service","6":"requests_users.user.attachment","7":"requests_users.user.user_profile"}}',JobRequestGet.get(params).$promise.then(function(viewResponse){if($scope.job=viewResponse.data,$scope.job.user.created_at=moment($scope.job.user.created_at).format("YYYY-MM-DD"),$scope.job.appointment_from_date=moment($scope.job.appointment_from_date).format("YYYY-MM-DD"),$scope.job.appointment_to_date=moment($scope.job.appointment_to_date).format("YYYY-MM-DD"),$scope.job.appointment_from_time=moment($scope.job.appointment_from_time,"HH:mm:ss").format("hh:mm a"),$scope.job.appointment_to_time=moment($scope.job.appointment_to_time,"HH:mm:ss").format("hh:mm a"),$scope.job.user.attachment){var hash=md5.createHash($scope.job.user.attachment["class"]+$scope.job.user.attachment.id+"pngbig_thumb");$scope.job.requestor_image="images/big_thumb/"+$scope.job.user.attachment["class"]+"/"+$scope.job.user.attachment.id+"."+hash+".png"}else $scope.job.requestor_image=$window.theme+"images/default.png";if($scope.job.list_of_days=[{id:"sun_search",text:"Sun",checked:!1},{id:"mon_search",text:"Mon",checked:!1},{id:"tue_search",text:"Tue",checked:!1},{id:"wed_search",text:"Wed",checked:!1},{id:"thu_search",text:"Thu",checked:!1},{id:"fri_search",text:"Fri",checked:!1},{id:"sat_search",text:"Sat",checked:!1}],angular.forEach($scope.job.list_of_days,function(value){"Sun"===value.text?(value.checked=1===parseInt($scope.job.is_sunday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.sunday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.sunday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Mon"===value.text?(value.checked=1===parseInt($scope.job.is_monday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.monday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.monday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Tue"===value.text?(value.checked=1===parseInt($scope.job.is_tuesday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.tuesday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.tuesday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Wed"===value.text?(value.checked=1===parseInt($scope.job.is_wednesday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.wednesday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.wednesday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Thu"===value.text?(value.checked=1===parseInt($scope.job.is_thursday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.thursday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.thursday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Fri"===value.text?(value.checked=1===parseInt($scope.job.is_friday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.friday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.friday_appointment_to_time,"HH:mm:ss").format("hh:mm a"))):"Sat"===value.text&&(value.checked=1===parseInt($scope.job.is_saturday_needed)?!0:!1,value.checked===!0&&(value.start=moment($scope.job.saturday_appointment_from_time,"HH:mm:ss").format("hh:mm a"),value.end=moment($scope.job.saturday_appointment_to_time,"HH:mm:ss").format("hh:mm a")))}),"JobEdit"===$state.current.name&&$scope.editJob(),angular.forEach($scope.job.requests_users,function(child_value){if(child_value.user.attachment){var hash=md5.createHash(child_value.user.attachment["class"]+child_value.user.attachment.id+"pngnormal_thumb");child_value.interestor_image="images/normal_thumb/"+child_value.user.attachment["class"]+"/"+child_value.user.attachment.id+"."+hash+".png"}else child_value.interestor_image=$window.theme+"images/default.png"}),$scope.job.requests_user_count<6)for(var i=$scope.job.requests_user_count;6>i;i++)$scope.job.requests_users[i]={id:0}}),$scope.ExpressInterest=function(requestId){params={},params.request_id=requestId,ExpressInterest.post(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Successfully Applied."),"success",!1),$scope.job.current_user_interest={id:response.id,request_id:response.request_id,user_id:response.user_id})})},$scope.RemoveInterest=function(requestId){params={},params.requestsUserId=requestId,RemoveInterest["delete"](params,function(response){0===response.error.code&&(flash.set($filter("translate")("Interest removed successfully."),"success",!1),$scope.job.current_user_interest=null)})},$scope.closeJob=function(jobId){SweetAlert.swal({title:$filter("translate")("Are you sure you want to close this job?"),text:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"OK",cancelButtonText:"Cancel",closeOnConfirm:!0,animation:!1},function(isConfirm){isConfirm&&(params={},params.requestId=jobId,params.request_status_id=RequestStatusId.Closed,JobRequestGet.put(params,function(response){0===response.error.code&&(flash.set($filter("translate")("Successfully Closed."),"success",!1),$scope.job.request_status_id=RequestStatusId.Closed)}))})},$scope.editJob=function(){$state.go("JobEdit",{job_id:$scope.job.id})},$scope.ChangeButtonText=function(type){"Enter"===type?$scope.buttonText="Remove Interest":$scope.buttonText="Already applied"}}),angular.module("hirecoworkerApp").factory("JobRequestMe",function($resource){return $resource("/api/v1/me/requests",{},{get:{method:"GET"}})}).factory("JobRequestPost",function($resource){return $resource("/api/v1/requests",{},{post:{method:"POST"}})}).factory("JobRequestGet",function($resource){return $resource("/api/v1/requests/:requestId",{requestId:"@requestId"},{get:{method:"GET"},put:{method:"PUT"},"delete":{method:"DELETE"}})}).factory("ExpressInterest",function($resource){return $resource("/api/v1/requests_users",{},{post:{method:"POST"}})}).factory("RemoveInterest",function($resource){return $resource("/api/v1/requests_users/:requestsUserId",{requestsUserId:"@requestsUserId"},{"delete":{method:"DELETE"}})}),angular.module("hirecoworkerApp.Request").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Request/Request/views/job_board.html",''),$templateCache.put("scripts/plugins/Request/Request/views/job_list_home.html",''), $templateCache.put("scripts/plugins/Request/Request/views/job_post_home.html",'

    {{\'Selected Service:\' | translate}} {{selectedServiceName}}

    {{\'Selected Service:\' | translate}} {{selectedServiceName}}

    {{\'What type of service you need?\'|translate}}

    {{\'What date?\'|translate}}

    • {{\'Please select valid date\'|translate}}
      {{\'Please select valid time\'|translate}}

    {{\'Describe your schedule\'|translate}}

    {{\'Please select times the job will occur.\' | translate }}

    {{\'Please select valid time\'|translate}}

    {{request_details.from_date | date :\'EEEE MMM dd\'}} {{request_details.show_from_time | date :\'hh:mm a\'}} - {{request_details.to_date | date :\'EEEE MMM dd\'}} {{request_details.show_to_time | date :\'hh:mm a\'}} {{request_details.show_to_time | date :\'hh:mm a\'}}
    {{request_details.from_date | date :\'EEEE MMM dd\'}} - {{request_details.to_date | date :\'EEEE MMM dd\'}}

    {{\'various times\' | translate}}

    {{regular_start | date}}-{{regular_end}}

    {{\'Introduce yourself and set a rate\'|translate}}

    {{\'Enter Address\' | translate }}
    {{\'Enter Allowed Locations\' | translate}}
    {{\'Please choose address from autocomplete.\' | translate}}
    {{\'Choose City\' | translate }}
    {{\'Enter State\' | translate }}
    {{\'Enter Country\'| translate }}
    {{\'Enter Postal Code\' | translate }}

    {{data.name| translate}}

    {{$root.currency_type}}
    {{\'Enter hourly rate\' | translate }} {{\'Enter valid hourly rate\' | translate }}
    {{\'Required\' | translate }} {{\'For your own privacy and security, please do not include contact information above.\'|translate}}
    {{"Missing information" | translate}}
      

    {{$index+1}}. {{data| translate}}

    '),$templateCache.put("scripts/plugins/Request/Request/views/job_view.html",'')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Request');"use strict";angular.module("hirecoworkerApp.Interview",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]),angular.module("hirecoworkerApp").directive("interviewBlock",function(){return{restrict:"E",templateUrl:"scripts/plugins/Interview/Interview/views/interview.html",scope:!0}}),angular.module("hirecoworkerApp.Interview").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Interview/Interview/views/interview.html",'
    {{\'Interview\' | translate }}
    {{\'Enter Skype Id\' | translate }}
    *{{\'Rate\' | translate }} ({{$root.settings.CURRENCY_SYMBOL}})({{$root.settings.SITE_CURRENCY_CODE}}) {{\'Enter hourly rate\' | translate }} {{\'Enter valid hourly rate\' | translate }} {{\'Enter valid hourly rate\'| translate }}
    {{\'Cancellation policy\' | translate }}
    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Interview');"use strict";angular.module("hirecoworkerApp.CancellationPolicies",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.CancellationPolicies');"use strict";angular.module("hirecoworkerApp.Message",["hirecoworkerApp.Constant","ngResource","ui.router.state","ui.router","ui.bootstrap","ui.calendar","ngSanitize","satellizer","ngAnimate","angular-growl","pascalprecht.translate","ngCookies","ngMap","builder","builder.components","google.places","angular-input-stars","tmh.dynamicLocale","angular-loading-bar","angular-input-stars","mwl.calendar","ngFileUpload","vcRecaptcha","mgcrea.ngStrap","hm.readmore","checklist-model","daterangepicker","oitozero.ngSweetAlert","angular-md5","ngRateIt","angularjs-dropdown-multiselect","slugifier","720kb.socialshare"]).config(function($stateProvider){var getToken={TokenServiceData:function(TokenService,$q){return $q.all({AuthServiceData:TokenService.promise,SettingServiceData:TokenService.promiseSettings})}};$stateProvider.state("UserMessages",{url:"/user/message",templateUrl:"scripts/plugins/photos/views/index.html",controller:"PhotosController",resolve:getToken})}),angular.module("hirecoworkerApp").controller("MessagesController",function($rootScope,$scope,$state,$location,$stateParams,$filter,$cookies,messagesFactory,sendMessagesFactory,flash,$timeout,Upload,md5,$interval){$rootScope.header=$rootScope.settings.SITE_NAME+" | "+$filter("translate")("Messages"),$scope.showSingleMessage=[],$scope.loadmore=!1,$scope.left_currentPage=1,$scope.loginUserId=$rootScope.auth.id,$scope.MessagePage=1,$scope.GetMessage=function(messageContentId,msgPage){$scope.MessagePage=msgPage,$scope.skipValue=1==$scope.MessagePage?0:10*($scope.MessagePage-1);var messageParams={};messageParams.filter='{"limit":10,"skip":'+$scope.skipValue+',"order":"id desc","include":{"0":"user.attachment","1":"foreign_message","2":"children","3":"attachment","4":"message_content","5":"other_user.attachment","6":"user.user_profile","7":"other_user.user_profile"},"where":{"user_id":'+$rootScope.auth.id+',"class":"Appointment","foreign_id":'+$stateParams.id+"}}",messagesFactory.get(messageParams,function(response){$scope.SingleMessage=response.data,response.data.length>0&&($scope.foreignId=response.data[0].foreign_id),angular.isDefined(response._metadata)&&($scope.messageNoOfPages=response._metadata.last_page,$scope.remainingMessage=response._metadata.total-10*response._metadata.current_page,$scope.messageTotal=10*response._metadata.current_page,$scope.Total=response._metadata.total,response._metadata.total>$scope.messageTotal&&$scope.messageTotal>0||($scope.messageTotal=0),$scope.currentPage=response._metadata.current_page),1===$scope.MessagePage&&($scope.showSingleMessage=[],setTimeout(function(){$("div#bottom").animate({scrollTop:$("div#bottom")[0].scrollHeight},"slow")},10));var hash="";angular.forEach($scope.SingleMessage,function(value,key){null!==value.user.attachment?(hash=md5.createHash(value.user.attachment["class"]+value.user.attachment.id+"pngsmall_thumb"),value.users_avatar_url="images/small_thumb/"+value.user.attachment["class"]+"/"+value.user.attachment.id+"."+hash+".png"):value.users_avatar_url="images/default.png",null!==value.other_user.attachment?(hash=md5.createHash(value.other_user.attachment["class"]+value.other_user.attachment.id+"pngsmall_thumb"),value.other_user_avatar_url="images/small_thumb/"+value.other_user.attachment["class"]+"/"+value.other_user.attachment.id+"."+hash+".png"):value.other_user_avatar_url="images/default.png",$scope.showSingleMessage.push(value)})})},$scope.sendMessage=function(){var sendMessageParams={};sendMessageParams.parent_id=$scope.messageContentId,sendMessageParams.foreign_id=$stateParams.id,sendMessageParams["class"]="Appointment",sendMessageParams.subject="Enquiry",null!==$scope.getUserMessage&&""!==$scope.getUserMessage&&(sendMessageParams.message=$scope.getUserMessage,sendMessagesFactory.create(sendMessageParams,function(){$scope.getUserMessage="",$scope.loadmore=!1,$scope.GetMessage($scope.messageContentId,1)}))},$scope.upload=function(file){Upload.upload({url:"/api/v1/attachments?class=UserProfile",data:{file:file}}).then(function(response){$scope.messageImage=response.data.attachment})},$scope.message_pagination=function(){$scope.loadmore=!0,$scope.MessagePage=parseInt($scope.currentPage)+1,$scope.GetMessage($scope.messageContentId,$scope.MessagePage)},$scope.GetMessage("",$scope.MessagePage),"BookingDetail"===$state.current.name&&$interval(function(){$scope.GetMessage("",$scope.MessagePage)},6e4)}).directive("messageChat",function(){var linker=function(scope,element,attrs){};return{restrict:"E",templateUrl:"scripts/plugins/Message/Message/views/message.html",link:linker,controller:"MessagesController",bindToController:!0}}),angular.module("hirecoworkerApp").factory("messagesFactory",["$resource",function($resource){return $resource("/api/v1/messages",{filter:"@filter"},{},{get:{method:"GET"}})}]).factory("sendMessagesFactory",["$resource",function($resource){return $resource("/api/v1/messages",{},{create:{method:"POST"}})}]),angular.module("hirecoworkerApp.Message").run(["$templateCache",function($templateCache){$templateCache.put("scripts/plugins/Message/Message/views/message.html",'

    {{\'Conversations\' | translate}}

    {{message.message_content.created_at | timeago}}

    {{message.message_content.created_at | timeago}}

    --{{\'Start Conversation\'|translate}}--

    {{\'No Messages Found\'| translate}}

    ')}]);angular.module('hirecoworkerApp').requires.push('hirecoworkerApp.Message');