{"version":3,"sources":["webpack:///./src/views/Settings/account/preferences.vue","webpack:///./src/components/contents/SettingsLinks/Forms/preferences.vue","webpack:///./src/services/email.http.js","webpack:///./src/components/contents/SettingsLinks/Forms/preferences.vue?2f17","webpack:///./src/views/Settings/account/preferences.vue?156d","webpack:///./src/components/contents/SettingsLinks/Forms/preferences.vue?ac2a"],"names":["_createBlock","_component_Content","class","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","_component_q_option_group","options","$data","settlementOptions","type","settlement","$event","_hoisted_2","_component_AppButton","width","label","disabled","$options","settlementSaveChangesButtonState","_hoisted_3","_component_q_list","_Fragment","_renderList","emailNotificationOptions","option","idx","_component_q_item","tag","key","_component_q_item_section","avatar","_component_q_checkbox","emailTransactions","val","name","color","_component_q_item_label","caption","_$data$businessInfo","_toDisplayString","businessInfo","user","email","_$data$businessInfo2","_component_router_link","to","_cache","_hoisted_4","onClick","updateEmailPreferences","_component_ProtectedComponent","roles","ROLES","ADMIN","OWNER","_$data$withdrawalSett","_$data$withdrawalSett2","_component_q_card","flat","_component_q_card_section","_hoisted_5","_component_q_toggle","paymentApprovalToggle","updateWithdrawalPermission","left-label","withdrawalSettingsBE","numberOfMustApprovals","_hoisted_6","_component_AppSelect","members","backgroundColor","placeholder","withdrawalSettings","adminIds","multiple","emit-value","map-options","rules","_ctx","required","allAdminCanApprove","_hoisted_7","_component_AppInput","lazy-rules","allSelectedMustApprove","updateWithdrawalSettings","paymentApprovalSaveChangesButtonState","_hoisted_8","_hoisted_9","text-color","gettingAdmins","_hoisted_10","_component_q_spinner","size","thickness","_hoisted_11","authorizedTeamMembers","admin","id","_hoisted_12","firstName","lastName","_hoisted_13","_hoisted_14","Email","constructor","api","api2","this","http","http2","updateEmailNotificationPreferences","payload","post","components","AppButton","AppSelect","AppInput","ProtectedComponent","mixins","permissionsMixin","authRulesMixin","data","_this$businessOwner","_this$businessOwner2","_this$businessInfo","paymentApproval","limitsSelection","value","withdrawalLimit","allAdminApprove","ref","JSON","parse","localStorage","getItem","userOwner","initiateLoading","validatingAccount","accountOwner","businessOwner","complianceService","emailService","wallets","otp","phoneOtpD","walletService","deactivationService","paymentService","banklist","showOthers","deactiveSuccessful","deactiveFailed","banks","reasons","form","reason","bankCode","accountName","accountNumber","description","walletInfo","deleteAccountWhy","deleteAccountBankDetails","emailOtp","phoneOtp","teamService","disableNotificationPreferenceButton","supportContact","limit","currentPage","watch","length","validateAccount","computed","business","$store","getters","Object","values","some","x","_this$withdrawalSetti","created","WalletService","$api1","$api2","DeactivationService","PaymentService","PaymentApproval","TeamService","ComplianceService","EmailService","getWallets","mounted","isOwner","getEmailNotificationOptions","fetchBanks","getTeamMembers","setWithdrawalPrefrence","getAuthorizedMembers","getBusinessDetails","methods","removeAdmin","result","findIndex","obj","splice","$q","loading","show","message","response","toggleApproval","enabled","$mixpanel","track","showMessage","err","_err$response","errMsg","error","hide","_err$response2","_response$data$data$w","setItem","stringify","commit","formattedMembers","fetchTeamMembers","page","users","map","member","_this$business$withdr","formatMoney","getBanks","validateBankAccount","getOtpData","getPhoneOtp","deleteAccountBankDetailsModal","verifyEmailOtp","token","_error$response","verifyPhoneOtp","_error$response2","initiateDeactivate","_error$response3","_this$businessInfo2","myNotifs","entries","notificationSettings","filter","businessNotificationSettings","convertArrayToObject","sendTransactionEmail","keys","forEach","push","notificationsArray","notification","async","reduce","item","payloadItems","sendToOwner","sendToSupport","sendToBusiness","undefined","__exports__","QOptionGroup","QCheckbox","QList","QItem","QItemSection","QItemLabel","QCard","QCardSection","QToggle","QSpinner","Ripple","Content","render"],"mappings":"kPACEA,yBAAWC,G,SCCJC,MAAM,0B,GAOJA,MAAM,W,GAIRA,MAAM,0C,GA6BAA,MAAM,mB,GA2BNA,MAAM,oB,GAuBNA,MAAM,W,GAkBNA,MAAM,W,GAeNA,MAAM,qC,GAEJA,MAAM,Y,mBAcNA,MAAM,O,GAEFA,MAAM,c,GASZA,MAAM,iB,GAEHA,MAAM,mB,8xBAzJtBC,gCAmZM,YAl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D,EAAIlL,GAAOoG,IAEN8E,GAGT7J,uBAAwBoN,iBACtBzJ,KAAK2D,qCAAsC,EAE3C,IAAIvD,EAAUJ,KAAK5E,kBAAkBsO,OAAO,CAACC,EAAMvI,KAAU,IAAMuI,EAAM,CAACvI,IAAQ,IAAS,IACvFwI,EAAe,CAACC,aAAa,EAAOC,eAAc,EAAOC,gBAAe,GAE5E,IAAI,MAAMJ,KAAQC,OACKI,IAAlB5J,EAAQuJ,KACTvJ,EAAQuJ,IAAQ,GAIpB,GAAIrF,OAAO8E,KAAKhJ,GAAS4D,OAAQ,CAC/BhE,KAAKoG,GAAGC,QAAQC,KAAK,CACnBC,QAAS,4BAEX,IACE,MAAMC,QAAiBxG,KAAKkC,aAAa/B,mCAAmCC,IACpEU,MAAM,QAAEyF,IAAcC,EAC9BxG,KAAK6G,YAAY,UAAWN,GAC5B,MAAOO,GACP9G,KAAK6G,YAAY,QAASC,EAAIN,SAAS1F,KAAKmG,OAE5C,QACAjH,KAAKoG,GAAGC,QAAQa,Y,0LEl4B1B,MAAM+C,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS,GAAQ,CAAC,YAAY,qBAE1E,QAYf,IAAS,EAAQ,aAAc,CAACC,eAAA,KAAaC,YAAA,KAAUC,QAAA,KAAMC,QAAA,KAAMC,eAAA,KAAaC,aAAA,KAAWC,QAAA,KAAMC,eAAA,KAAaC,UAAA,KAAQC,WAAA,OAAW,IAAS,EAAQ,aAAc,CAACC,SAAA,OHhBlJ,OACbtK,WAAY,CACVuK,YIFJ,MAAM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASC,KAErD,gB,oCCPf,W","file":"js/chunk-56ecd2af.91c17fce.js","sourcesContent":["<template>\n  <Content />\n</template>\n<script>\nimport Content from \"@/components/contents/SettingsLinks/Forms/preferences.vue\";\nexport default {\n  components: {\n    Content,\n  },\n};\n</script>\n","<template>\n  <div>\n    <div class=\"q-pa-md personal-cover\">\n      <p class=\"sub-title\">Settlement</p>\n      <p class=\"description\">How do you wish to receive your earnings</p>\n\n      <div>\n        <q-option-group :options=\"settlementOptions\" type=\"radio\" v-model=\"settlement\" />\n      </div>\n      <div class=\"q-mt-lg\">\n        <AppButton width=\"161px\" label=\"Save Changes\" :disabled=\"settlementSaveChangesButtonState\" />\n      </div>\n    </div>\n    <div class=\" personal-cover q-mt-lg q-pt-md q-pb-sm\">\n      <p class=\"sub-title q-pl-lg\">Emails notifications</p>\n      <p class=\"description q-pl-lg\">Set your transactional emails</p>\n      <div>\n        <!-- <q-checkbox\n          v-model=\"emailTransactions\"\n          disable\n          label=\"Email me for every transaction\"\n        /> -->\n        <q-list class=\"q-mb-lg\">\n          <q-item tag=\"label\" v-ripple class=\"email_notification_options_checkbox\"\n            v-for=\"(option, idx) in emailNotificationOptions\" :key=\"idx\">\n            <q-item-section avatar class=\"q-pr-xs\">\n              <q-checkbox v-model=\"emailTransactions\" :val=\"option.name\" color=\"black\" />\n            </q-item-section>\n            <q-item-section>\n              <q-item-label class=\"email_notification_section\">{{ option?.label }}</q-item-label>\n              <q-item-label caption v-if=\"option.name === 'sendToOwner'\">\n                Send transactions emails to {{ businessInfo?.user?.email }}\n              </q-item-label>\n              <q-item-label caption v-else-if=\"option.name === 'sendToBusiness'\">\n                Send transactions emails to {{ businessInfo?.email }}\n              </q-item-label>\n              <!-- {{ businessInfo?.supportContact?.email }}  -->\n              <q-item-label caption v-else>\n                Send transactions emails to <router-link to=\"/settings/account\" class=\"text-underline to-account-link cursor-pointer\">support email</router-link>\n              </q-item-label>\n            </q-item-section>\n          </q-item>\n          <div class=\"q-mt-lg q-pl-lg\">\n            <AppButton width=\"161px\" label=\"Save Changes\" @click=\"updateEmailPreferences\" />\n          </div>\n        </q-list>\n      </div>\n    </div>\n    <!-- <div v-if=\"userOwner\" class=\"q-mt-md flex justify-center\">\n      <AppButton\n        @click=\"deleteAccountWhy = true\"\n        width=\"200px\"\n        color=\"transparent\"\n        textColor=\"black\"\n        ><div class=\"flex justify-center\">\n          <img\n            class=\"q-mr-sm\"\n            src=\"https://res.cloudinary.com/ourpass-co/image/upload/v1657102569/merchant_v2/close-business_qch754.svg\"\n            alt=\"\"\n          />\n          close this business\n        </div></AppButton\n      >\n    </div>-->\n\n    <ProtectedComponent :roles=\"[ROLES.ADMIN, ROLES.OWNER]\">\n      <q-card flat class=\"q-pa-lg q-mt-lg approval-toggle\">\n        <q-card-section>\n          <div class=\"approval-header\">Payment approvals</div>\n          <div class=\"approval_wrapper\">\n            <div class=\"approval-text q-mt-sm\">\n              You can enable a control to your OurPass business account to\n              requires admin approval for payments above a custom daily maximum,\n              team invites, permission updates, and more.\n            </div>\n            <div>\n              <q-toggle v-model=\"paymentApprovalToggle\" @click=\"updateWithdrawalPermission\" label=\"\" left-label />\n            </div>\n          </div>\n        </q-card-section>\n      </q-card>\n\n      <q-card flat class=\"q-pa-lg q-mt-md approval-toggle\" v-if=\"paymentApprovalToggle && !withdrawalSettingsBE?.numberOfMustApprovals\n        \">\n        <q-card-section>\n          <div class=\"approval-header\">Payment approvals</div>\n          <div class=\"approval_wrapper\">\n            <div class=\"approval-text q-mt-sm\">\n              Select individuals who can approve withdrawals\n            </div>\n          </div>\n\n          <div class=\"q-mt-md\">\n            <AppSelect :options=\"members\" backgroundColor=\"white\" label=\"Select an option\" placeholder=\"Select an option\"\n              v-model=\"withdrawalSettings.adminIds\" multiple emit-value map-options :rules=\"[required]\" />\n\n            <q-checkbox class=\"q-mt-md\" v-model=\"withdrawalSettings.allAdminCanApprove\" label=\"All Admins can approve\" />\n          </div>\n        </q-card-section>\n\n        <hr />\n        <q-card-section>\n          <div class=\"approval-header\">Approvals conditions</div>\n          <div class=\"approval_wrapper\">\n            <div class=\"approval-text q-mt-sm\">\n              Select number individuals who should approve before a transactions\n              is initiated\n            </div>\n          </div>\n\n          <div class=\"q-mt-md\">\n            <AppInput label=\"Number of approvals required\" placeholder=\"Enter numbers required\" backgroundColor=\"white\"\n              v-model=\"withdrawalSettings.numberOfMustApprovals\" type=\"number\" lazy-rules :rules=\"[required]\" />\n            <q-checkbox v-model=\"withdrawalSettings.allSelectedMustApprove\"\n              label=\"All selected individuals must approve\" />\n          </div>\n\n          <AppButton class=\"q-mt-md\" width=\"40%\" @click=\"updateWithdrawalSettings()\" label=\"Save Changes\"\n            :disabled=\"paymentApprovalSaveChangesButtonState\" />\n        </q-card-section>\n      </q-card>\n\n      <q-card flat class=\"q-pa-lg q-mt-md approval-toggle\" v-if=\"paymentApprovalToggle && withdrawalSettingsBE?.numberOfMustApprovals\n        \">\n        <q-card-section>\n          <div class=\"flex justify-between items-center\">\n            <div class=\"approval-header\">Payment approvals</div>\n            <div class=\"edit-btn\">\n              <AppButton label=\"Edit preference\" @click=\"withdrawalSettingsBE = null\" text-color=\"#000000\"\n                color=\"#000000\" />\n            </div>\n          </div>\n\n          <div>\n            <div class=\"approval-item q-mt-lg q-mb-md\">\n              Individuals who can approve withdrawals\n            </div>\n            <div v-if=\"gettingAdmins\">\n              <q-spinner color=\"primary\" size=\"3em\" :thickness=\"2\" />\n              <div>Getting Admins</div>\n            </div>\n            <div class=\"row\" v-else>\n              <div class=\"col-md-3\" v-for=\"admin in authorizedTeamMembers\" :key=\"admin.id\">\n                <div class=\"admin-list\">\n                  {{ admin.firstName + \" \" + admin.lastName }}\n                </div>\n              </div>\n            </div>\n          </div>\n\n          <hr />\n\n          <div class=\"approval-item\">\n            <span class=\"condition-title\">Approvals conditions:</span>\n            <span class=\"condition-value\">{{ withdrawalSettings.numberOfMustApprovals }} approvals\n              required</span>\n          </div>\n        </q-card-section>\n      </q-card>\n    </ProtectedComponent>\n\n    <!-- Delete account why, modal  -->\n    <!-- <AppModal\n      title=\"Account Deactivation\"\n      :show=\"deleteAccountWhy\"\n      v-on:closecard=\"deleteAccountWhy = false\"\n    >\n      <div class=\"modal-container\">\n        <div class=\"q-mb-md whydoyou\">\n          Why do you want to disable your account?\n        </div>\n        <AppSelect\n          :options=\"reasons\"\n          label=\"Reason\"\n          placeholder=\"Select an option\"\n          v-model=\"form.reason\"\n        />\n        <div class=\"q-my-md\" v-if=\"showOthers\">\n          <AppTextarea\n            v-model=\"description\"\n            label=\"Tell us why\"\n            placelabel=\"Enter description\"\n          />\n        </div>\n        <div class=\"flex q-mt-lg modal-btn\">\n          <AppButton\n            label=\"Continue\"\n            @click=\"deleteAccountBankDetailsModal()\"\n          />\n        </div>\n      </div>\n    </AppModal>\n    <AppModal\n      title=\"Account Deactivation\"\n      :show=\"deleteAccountBankDetails\"\n      v-on:closecard=\"deleteAccountBankDetails = false\"\n    >\n      <div class=\"\">\n        <div class=\"q-mb-md whydoyou text-center\">\n          Are you sure you want to<br />\n          delete your business account?\n        </div>\n        <InfoCard>\n          <div>\n            please enter bank details to transfer your current wallet balance.\n          </div>\n        </InfoCard>\n        <div class=\"q-my-lg walletBalance text-center q-py-sm\">\n          Wallet balance- {{ formatMoney(walletInfo?.balance) }}\n        </div>\n        <div class=\"q-mb-md\">\n          <AppSelect\n            :options=\"banks\"\n            option-value=\"code\"\n            option-label=\"name\"\n            emit-value\n            map-options\n            label=\"Bank name\"\n            placeholder=\"Select bank\"\n            v-model=\"form.bankCode\"\n          />\n        </div>\n        <div class=\"q-mb-md\">\n          <AppInput\n            label=\"Account number\"\n            maxlength=\"10\"\n            placeholder=\"Enter account number\"\n            v-model=\"form.accountNumber\"\n          />\n        </div>\n        <div v-if=\"validatingAccount\" class=\"\">\n          <q-spinner color=\"primary\" size=\"2em\" />\n        </div>\n        <div class=\"whydoyou\">\n          {{ form.accountName }}\n        </div>\n        <div class=\"flex q-mt-lg\">\n          <AppButton\n            label=\"Continue\"\n            :loading=\"initiateLoading\"\n            @click=\"deactivateInitiate()\"\n            :disabled=\"settingDefault\"\n          />\n        </div>\n      </div>\n    </AppModal>\n    <AppModal\n      title=\"Account Deactivation\"\n      :show=\"emailOtp\"\n      v-on:closecard=\"emailOtp = false\"\n    >\n      <div class=\"\">\n        <div class=\"q-mt-lg\">\n          <div>\n            <div class=\"flex justify-center\">\n              <img\n                class=\"\"\n                alt=\"\"\n                src=\"https://res.cloudinary.com/ourpass-co/image/upload/v1657111451/merchant_v2/backdrop-envelop_m5t19g.svg\"\n              />\n            </div>\n            <p class=\"email-receiver\">\n              Please enter the OTP that was sent to<br />\n              <span class=\"email\">{{ businessOwner?.email }}</span>\n            </p>\n            <div class=\"input-area\">\n              <p class=\"text-center semibold\">Email OTP.</p>\n              <div class=\"otp-input\">\n                <OtpInput @otpData=\"getOtpData\" />\n              </div>\n              <div class=\"q-ma-md resend-row\">\n                <button\n                  class=\"inline-button cursor-pointer\"\n                  @click.prevent=\"resendOtp\"\n                >\n                  Resend OTP <q-spinner v-if=\"resendLoading\" />\n                </button>\n                <div class=\"length\">\n                  OTP expires in <span>{{ timeLeft }}</span>\n                </div>\n              </div>\n              <div class=\"q-mb-md\">\n                <AppButton\n                  label=\"Confirm\"\n                  @click=\"validateEmailOtp()\"\n                  :disabled=\"isDisabled\"\n                  :loading=\"loading\"\n                />\n              </div>\n              <div class=\"q-mt-lg text-center q-mb-lg receiveOtp\">\n                Why did I not recieve an OTP?\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </AppModal>\n    <AppModal\n      title=\"Account Deactivation\"\n      :show=\"phoneOtp\"\n      v-on:closecard=\"phoneOtp = false\"\n    >\n      <div class=\"\">\n        <div class=\"q-mt-lg\">\n          <div>\n            <div class=\"flex justify-center\">\n              <img\n                class=\"\"\n                alt=\"\"\n                src=\"https://res.cloudinary.com/ourpass-co/image/upload/v1657111451/merchant_v2/backdrop-envelop_m5t19g.svg\"\n              />\n            </div>\n            <p class=\"email-receiver\">\n              Please enter the OTP that was sent to<br />\n              <span class=\"email\">+{{ businessOwner?.phoneNumber }}</span>\n            </p>\n            <div class=\"input-area\">\n              <p class=\"text-center semibold\">Phone OTP.</p>\n              <div class=\"otp-input\">\n                <OtpInput @otpData=\"getPhoneOtp\" />\n              </div>\n              <div class=\"q-ma-md resend-row\">\n                <button\n                  class=\"inline-button cursor-pointer\"\n                  @click.prevent=\"resendOtp\"\n                >\n                  Resend OTP <q-spinner v-if=\"resendLoading\" />\n                </button>\n                <div class=\"length\">\n                  OTP expires in <span>{{ timeLeft }}</span>\n                </div>\n              </div>\n              <div class=\"q-mb-md\">\n                <AppButton\n                  label=\"Confirm\"\n                  @click=\"validatePhoneOtp()\"\n                  :loading=\"loading\"\n                />\n              </div>\n              <div class=\"q-mt-lg text-center q-mb-lg receiveOtp\">\n                Why did I not recieve an OTP?\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </AppModal>\n    <AppModal\n      title=\"Delete account\"\n      :show=\"deactiveSuccessful\"\n      v-on:closecard=\"deactiveSuccessful = false\"\n    >\n      <div class=\"\">\n        <div class=\"q-py-lg\">\n          <div class=\"flex justify-center\">\n            <img\n              class=\"\"\n              alt=\"\"\n              src=\"https://res.cloudinary.com/ourpass-co/image/upload/v1657114069/merchant_v2/deactivate-account_bmx3jd.svg\"\n            />\n          </div>\n          <div class=\"deactivate-title q-mt-lg text-center\">\n            Account deactivated\n          </div>\n          <div class=\"q-my-lg text-center q-px-xl deactivate-text\">\n            Your request to delete your OurPass account is being processed, once\n            confirmed you will no longer have access to your account\n          </div>\n        </div>\n      </div>\n    </AppModal>\n    <AppModal\n      title=\"Delete account\"\n      :show=\"deactiveFailed\"\n      v-on:closecard=\"deactiveFailed = false\"\n    >\n      <div class=\"\">\n        <div class=\"q-py-lg\">\n          <div class=\"flex justify-center\">\n            <img\n              class=\"\"\n              alt=\"\"\n              src=\"https://res.cloudinary.com/ourpass-co/image/upload/v1657114069/merchant_v2/deactivate-account_bmx3jd.svg\"\n            />\n          </div>\n          <div class=\"deactivate-fail q-mt-lg text-center\">\n            Account deactivation failed\n          </div>\n          <div class=\"q-my-lg text-center q-px-xl deactivate-text\">\n            Your account cannot be deactivated, please resolve all pending\n            refund and disputes.\n          </div>\n          <div class=\"q-my-md flex justify-center\">\n            <AppButton\n              width=\"311px\"\n              label=\"Contact customer support\"\n              @click=\"verifyOtp\"\n              :disabled=\"isDisabled\"\n              :loading=\"loading\"\n            />\n          </div>\n        </div>\n      </div>\n    </AppModal> -->\n  </div>\n</template>\n\n<script>\nimport { ref } from 'vue';\nimport AppButton from '@/components/base/Button/Button';\nimport { formatMoney } from '@/helpers/money';\n// import AppModal from \"@/components/base/Modal/Modal.vue\";\n// import InfoCard from \"@/components/reusables/InfoCard\";\nimport AppSelect from \"@/components/base/Select\";\n// import AppTextarea from \"@/components/base/AppTextarea/Textarea.vue\";\nimport AppInput from \"@/components/base/AppInput/Input.vue\";\n// import OtpInput from \"@/components/base/OTPInput\";\nimport WalletService from '@/services/wallet.http.js';\nimport DeactivationService from '@/services/deactivation.http.js';\nimport PaymentService from '@/services/payment.http.js';\nimport PaymentApproval from '@/services/paymentApproval.http.js';\nimport TeamService from '@/services/teams.http.js';\nimport ComplianceService from '@/services/compliance.http';\nimport EmailService from \"@/services/email.http.js\";\nimport { permissionsMixin, authRulesMixin } from '@/mixins';\nimport ProtectedComponent from '@/components/reusables/ProtectedComponent.vue';\nimport { ROLES } from '@/helpers/permissions';\n\n\nexport default {\n  components: {\n    AppButton,\n    // AppModal,\n    // InfoCard,\n    AppSelect,\n    // AppTextarea,\n    AppInput,\n    // OtpInput,\n    ProtectedComponent,\n    // RadioGroup\n  },\n  mixins: [permissionsMixin, authRulesMixin],\n\n  data() {\n    return {\n      ROLES,\n      paymentApproval: null,\n      gettingAdmins: false,\n      limitsSelection: [\n        {\n          label: \"Take a selfie\",\n          value: \"selfie\",\n        },\n        {\n          label: \"USSD phone verification\",\n          value: \"ussd\",\n        },\n        {\n          label: \"SMS One-time password (OTP)\",\n          value: \"otp\",\n        },\n      ],\n      withdrawalLimit: null,\n      paymentApprovalToggle: false,\n      allAdminApprove: false,\n      emailTransactions: ref([]),\n      businessInfo: JSON.parse(localStorage.getItem('business')),\n      userOwner: false,\n      initiateLoading: false,\n      validatingAccount: false,\n      accountOwner: '',\n      businessOwner: JSON.parse(localStorage.getItem('business_owner')),\n      complianceService: null,\n      emailService: null,\n      wallets: null,\n      otp: \"\",\n      phoneOtpD: \"\",\n      walletService: null,\n      deactivationService: null,\n      paymentService: null,\n      banklist: [\"Access Bank\", \"GTBank\"],\n      showOthers: false,\n      deactiveSuccessful: false,\n      deactiveFailed: false,\n      banks: [],\n      members: [],\n      reasons: [\n        \"I have another OurPass account\",\n        \"My type of business is not allowed to operate on OurPass\",\n        \"I am not satisfied with OurPass services\",\n        \"I don’t understand how to use OurPass\",\n        \"Others\",\n      ],\n      settlement: \"\",\n      form: {\n        reason: \"\",\n        bankCode: \"\",\n        accountName: \"\",\n        accountNumber: \"\",\n      },\n\n      withdrawalSettings: {\n        numberOfMustApprovals: \"\",\n        allSelectedMustApprove: \"\",\n        allAdminCanApprove: false,\n        adminIds: [],\n      },\n      withdrawalSettingsBE: {},\n      authorizedTeamMembers: [],\n\n      description: \"\",\n      walletInfo: null,\n      deleteAccountWhy: false,\n      deleteAccountBankDetails: false,\n      emailOtp: false,\n      phoneOtp: false,\n      teamService: null,\n      disableNotificationPreferenceButton: true,\n      settlementOptions: [\n        {\n          label:\n            \"Settle to your available balance and make withdrawals yourself\",\n          value: \"balance\",\n        },\n        {\n          label:\n            \"Settle to your primary bank account (happens within 24 hours)\",\n          value: \"bank\",\n        },\n      ],\n      emailNotificationOptions: ref([\n        {\n          label: \"Email me for every transaction\",\n          name: \"sendToOwner\",\n          value: false,\n          email: this.businessOwner?.email\n        },\n        {\n          label: \"Send transaction email to main account's email\",\n          name: \"sendToBusiness\",\n          value: false,\n          email: this.businessOwner?.email\n        },\n        {\n          label: \"Support email receives transaction email\",\n          name: \"sendToSupport\",\n          value: false,\n          email: this.businessInfo?.supportContact?.email\n        }\n      ]),\n      limit: 50,\n      currentPage: 1\n    };\n  },\n\n  watch: {\n    \"form.reason\": function () {\n      if (this.form.reason == \"Others\") {\n        this.showOthers = true;\n      } else {\n        this.showOthers = false;\n      }\n    },\n    \"form.accountNumber\": function () {\n      if (this.form.accountNumber.length === 10 && this.form.bankCode) {\n        this.validateAccount();\n      }\n    },\n  },\n  computed: {\n    business: function () {\n      return this.$store.getters[\"Auth/business\"];\n    },\n    settlementSaveChangesButtonState: function () {\n      const form = { settlement: this.required(this.settlement) };\n      return Object.values(form).some((x) => x !== true);\n    },\n    paymentApprovalSaveChangesButtonState: function () {\n      const form = {\n        adminIds: this.withdrawalSettings.adminIds?.length > 0 ? true : false,\n        numberOfMustApprovals: this.required(\n          this.withdrawalSettings.numberOfMustApprovals\n        ),\n      };\n      return Object.values(form).some((x) => x !== true);\n    },\n\n  },\n  created() {\n    this.walletService = new WalletService(this.$api1, this.$api2);\n    this.deactivationService = new DeactivationService(this.$api2);\n    this.paymentService = new PaymentService(this.$api2);\n    this.paymentApproval = new PaymentApproval(this.$api2);\n    this.teamService = new TeamService(this.$api1, this.$api2);\n    this.complianceService = new ComplianceService(this.$api1, this.$api2);\n    this.emailService = new EmailService(this.$api1, this.$api2);\n    this.getWallets();\n\n  },\n  mounted() {\n    // console.log('business infossss', this.businessInfo);\n    // console.log(\n    //   'business owner',\n    //   JSON.parse(localStorage.getItem('business_owner'))\n    // );\n    console.log('user owner', JSON.parse(localStorage.getItem('user')).isOwner);\n    this.walletInfo = JSON.parse(localStorage.getItem('wallet'));\n    this.userOwner = JSON.parse(localStorage.getItem('user')).isOwner;\n    // this.businessOwner = JSON.parse(localStorage.getItem('business_owner'));\n    // this.businessInfo = JSON.parse(localStorage.getItem('business'))\n    // console.log(\"jkdhkfjdf \", this.businessOwner, this.businessInfo)\n    this.getEmailNotificationOptions()\n    console.log('walletInfo', this.walletInfo);\n    this.fetchBanks();\n    this.getTeamMembers();\n    this.setWithdrawalPrefrence();\n    this.getAuthorizedMembers();\n    this.getBusinessDetails();\n  },\n  methods: {\n    removeAdmin(id) {\n      console.log(\"id to remove\", id);\n      console.log(\"array\", this.withdrawalSettings.adminIds);\n      const result = this.withdrawalSettings.adminIds.findIndex(\n        (obj) => obj.value === id\n      );\n\n      this.withdrawalSettings.adminIds =\n        this.withdrawalSettings.adminIds.splice(result);\n      // console.log(\n      //   \"this.withdrawalSettings.adminIds\",\n      //   this.withdrawalSettings.adminIds\n      // );\n      // return this.withdrawalSettings.adminIds;\n    },\n    async updateWithdrawalPermission() {\n      this.$q.loading.show({\n        message: \"Toggling settings ...\",\n      });\n      try {\n        const response = await this.paymentApproval.toggleApproval({\n          enabled: this.paymentApprovalToggle,\n        });\n\n         this.$mixpanel.track(\"Toggle Payment Approval\", {\n          email: this.$store.getters[\"Auth/business\"].email,\n          enabled: this.paymentApprovalToggle,\n        });\n        console.log(response.data.message);\n        this.showMessage(\"success\", response.data.message);\n      } catch (err) {\n        console.log(err);\n        const errMsg =\n          err.response?.data?.error ||\n          \"Unable to update withdrawal permission. Please try again\";\n        this.showMessage(\"error\", errMsg);\n      } finally {\n        this.$q.loading.hide();\n      }\n    },\n\n    async updateWithdrawalSettings() {\n      console.log(\"this.withdrawalSettings\", this.withdrawalSettings);\n\n      // if(this.withdrawalSettings.admins) {\n      //   this.withdrawalSettings.adminIds = this.withdrawalSettings.admins.map(member=> member.id);\n      // }\n      this.$q.loading.show({\n        message: \"Updating Settings  ...\",\n      });\n      try {\n        console.log(this.withdrawalSettings);\n        const response = await this.paymentApproval.updateWithdrawalSettings(\n          this.withdrawalSettings\n        );\n        console.log(response.data);\n        this.showMessage(\"success\", response.data.message);\n        this.getBusinessDetails();\n        this.getAuthorizedMembers();\n      } catch (err) {\n        console.log(err);\n        const errMsg =\n          err.response?.data?.error ||\n          \"Unable to update withdrawal settings. Please try again\";\n        this.showMessage(\"error\", errMsg);\n      } finally {\n        this.$q.loading.hide();\n      }\n    },\n\n    async getBusinessDetails() {\n      try {\n        const response = await this.complianceService.getBusinessDetails();\n        localStorage.setItem(\"business\", JSON.stringify(response.data.data));\n        this.$store.commit(\"Auth/business\", response.data.data);\n        this.paymentApprovalToggle =\n          response.data.data.withdrawalSettings?.enabled;\n        this.withdrawalSettingsBE = response.data.data.withdrawalSettings;\n      } catch (error) {\n        console.log(error);\n      }\n    },\n\n    async getTeamMembers() {\n      try {\n        let response = await this.teamService.fetchTeamMembers({\n          page: this.currentPage,\n          limit: this.limit,\n        });\n        let formattedMembers;\n        if (response.data.data.users) {\n          formattedMembers = response.data.data.users.map((member) => {\n            return {\n              label: member.firstName + \" \" + member.lastName,\n              value: member.id,\n            };\n          });\n        }\n\n        console.log(\"formattedMembers\", formattedMembers);\n\n        this.members = formattedMembers;\n      } catch (err) {\n        console.log(err);\n      }\n    },\n\n    async getAuthorizedMembers() {\n      this.gettingAdmins = true;\n      try {\n        const response = await this.paymentApproval.getTeamMembers();\n        this.authorizedTeamMembers = response.data.data;\n      } catch (err) {\n        console.log(err);\n      } finally {\n        this.gettingAdmins = false;\n      }\n    },\n\n    setWithdrawalPrefrence() {\n      this.withdrawalSettings = this.business.withdrawalSettings;\n      this.paymentApprovalToggle = this.business.withdrawalSettings?.enabled;\n    },\n\n    formatMoney,\n    async getWallets() {\n      const response = await this.walletService.getWallets();\n      const { data } = response.data;\n      this.wallets = data;\n      console.log(\"wallets\", this.wallets);\n    },\n\n    async fetchBanks() {\n      try {\n        const result = await this.paymentService.getBanks();\n        this.banks = result.data.data.banks;\n        console.log(\"banks\", this.banks);\n      } catch (err) {\n        console.log(err);\n      }\n    },\n\n    async validateAccount() {\n      try {\n        this.validatingAccount = true;\n        const result = await this.paymentService.validateBankAccount({\n          accountNumber: this.form.accountNumber,\n          bankCode: this.form.bankCode,\n        });\n        this.form.accountName = result.data.data.accountName;\n      } catch (err) {\n        this.showMessage(\"error\", \"Unable to validate bank details\");\n      }\n      this.validatingAccount = false;\n    },\n\n    getOtpData(data) {\n      this.otp = data;\n      console.log(\"otp value\", this.otp);\n    },\n\n    getPhoneOtp(data) {\n      this.phoneOtpD = data;\n    },\n\n    deleteAccountBankDetailsModal() {\n      this.deleteAccountWhy = false;\n      this.deleteAccountBankDetails = true;\n    },\n\n    async validateEmailOtp() {\n      (this.emailOtp = false), console.log(\"email otp\", this.otp);\n      try {\n        const response = await this.deactivationService.verifyEmailOtp({\n          token: this.otp,\n        });\n        console.log(\"response\", response);\n        this.phoneOtp = true;\n      } catch (error) {\n        console.log(\"error\", error);\n        // this.showMessage('error', 'incorrect email otp entered');\n        const errMsg =\n          error.response?.data?.error ||\n          \"Unable to validate email otp. Please try again\";\n        this.showMessage(\"error\", errMsg);\n      }\n    },\n\n    async validatePhoneOtp() {\n      (this.phoneOtp = false), console.log(\"email otp\", this.phoneOtpD);\n      try {\n        const response = await this.deactivationService.verifyPhoneOtp({\n          token: this.phoneOtpD,\n        });\n        console.log(\"response\", response);\n        this.deactiveSuccessful = true;\n      } catch (error) {\n        console.log(\"error\", error);\n        // this.showMessage('error', 'Incorrect phone otp entered');\n        this.deactiveFailed = true;\n        const errMsg =\n          error.response?.data?.error ||\n          \"Unable to validate phone otp. Please try again\";\n        this.showMessage(\"error\", errMsg);\n      }\n    },\n\n    async deactivateInitiate() {\n      this.initiateLoading = true;\n      this.deleteAccountBankDetails = false;\n      if (this.showOthers) {\n        this.form.reason = this.description;\n      }\n      console.log(\"form\", this.form);\n      try {\n        const response = await this.deactivationService.initiateDeactivate(\n          this.form\n        );\n        console.log(\"action response\", response);\n        this.emailOtp = true;\n      } catch (error) {\n        console.log(error);\n        const errMsg =\n          error.response?.data?.error ||\n          \"Unable to deactivate. Please try again\";\n        this.showMessage(\"error\", errMsg);\n      }\n      this.initiateLoading = false;\n    },\n\n    getEmailNotificationOptions: function () {\n      /*eslint no-unused-vars: [\"error\", { \"args\": \"none\" }]*/\n\n      let myNotifs = Object.entries(this.businessInfo?.notificationSettings).filter(([key, value]) => value === true)\n      let businessNotificationSettings = this.convertArrayToObject(myNotifs)\n      delete businessNotificationSettings.sendTransactionEmail\n\n      let keys = Object.keys(businessNotificationSettings)\n\n      keys.forEach((key) => {\n        console.log(\"keys\", key)\n        key === 'sendToOwner'\n          ? this.emailTransactions.push('sendToOwner')\n          : key === 'sendToBusiness' ? this.emailTransactions.push('sendToBusiness')\n            : this.emailTransactions.push('sendToSupport')\n      })\n\n      console.log(\"options: \" + this.emailTransactions)\n    },\n\n    convertArrayToObject: function (notificationsArray) {\n      let obj = {};\n\n      notificationsArray.forEach((notification) => {\n        let key = notification[0];\n        let value = notification[1];\n        obj[key] = value;\n      });\n      return obj;\n    },\n\n    updateEmailPreferences: async function () {\n      this.disableNotificationPreferenceButton = false\n\n      let payload = this.emailTransactions.reduce((item, value) => ({ ...item, [value]: true }), {})\n      let payloadItems = {sendToOwner: false, sendToSupport:false, sendToBusiness:false}\n      \n      for(const item in payloadItems) {\n        if(payload[item] === undefined) {\n          payload[item] = false\n        } \n      }\n      \n      if (Object.keys(payload).length) {\n        this.$q.loading.show({\n          message: \"Updating Preferences...\",\n        });\n        try {\n          const response = await this.emailService.updateEmailNotificationPreferences(payload);\n          const { data: { message } } = response;\n          this.showMessage(\"success\", message);\n        } catch (err) {\n          this.showMessage(\"error\", err.response.data.error);\n          console.log(err);\n        } finally {\n          this.$q.loading.hide();\n        }\n      }\n    },\n  },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.edit-btn {\n  border: 1px solid #101010;\n  border-radius: 4px;\n}\n\n.admin-list {\n  margin: 10px 0;\n  background: #ecfdf3;\n  border-radius: 16px;\n  color: #027a48;\n  font-weight: 600;\n  font-size: 14px;\n  width: 113px;\n  text-transform: capitalize;\n  padding: 5px;\n  text-align: center;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.condition-value {\n  color: #000000;\n  font-weight: 500;\n}\n\n.approval_wrapper {\n  display: flex;\n}\n\n.approval-toggle {\n  background: #fbfbfb;\n  padding: 0px;\n}\n\n.approval-header {\n  font-weight: 500;\n  font-size: 16px;\n  color: #222222;\n}\n\n.approval-text {\n  font-weight: 400;\n  font-size: 14px;\n  color: #666666;\n}\n\n.approval-item {\n  font-weight: 400;\n  font-size: 16px;\n  color: #666666;\n}\n\n.deactivate-text {\n  font-size: 14px;\n  line-height: 120%;\n  color: #222222;\n}\n\n.deactivate-title {\n  font-size: 20px;\n  line-height: 120%;\n  color: #222222;\n  font-weight: 600;\n}\n\n.deactivate-fail {\n  font-size: 20px;\n  line-height: 120%;\n  color: #dc3030;\n  font-weight: 600;\n}\n\n// otp email\n.receiveOtp {\n  font-size: 12px;\n  line-height: 20px;\n  color: #6d6e71;\n}\n\n.logo-container {\n  display: block;\n  margin: auto;\n  width: fit-content;\n  margin-top: 10px;\n  margin-bottom: 50px;\n}\n\n.form-card {\n  max-width: 500px;\n  margin: auto;\n}\n\n.form-area {\n  margin: auto;\n  width: 100%;\n}\n\n.otp-input {\n  max-width: 300px;\n  margin: auto;\n}\n\n.input-area {\n  max-width: 350px;\n  margin: auto;\n  margin-top: 30px;\n}\n\n.edit-email-text {\n  color: #0038e0;\n  text-decoration: underline;\n  cursor: pointer;\n}\n\n.edit-email-container {\n  .info-text {\n    font-size: 14px;\n    color: #222222;\n    margin-bottom: 20px;\n  }\n}\n\n.email-receiver {\n  text-align: center;\n  color: #666666;\n  line-height: 1;\n  font-weight: 400;\n  margin: 20px 0 10px 0;\n\n  .email {\n    font-weight: 500;\n    color: #000000;\n  }\n}\n\n.resend-row {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-top: 30px;\n  margin-bottom: 30px;\n\n  .length {\n    color: #6d6e71;\n    font-size: 13px;\n    font-weight: 400;\n  }\n}\n\n.semibold {\n  font-weight: 600;\n}\n\n.inline-button {\n  background-color: #e8f8f3;\n  padding: 8px 10px;\n  color: #1dbc86;\n  border-radius: 8px;\n  border: none;\n}\n\n.email-hint {\n  margin-top: 30px;\n\n  .body {\n    font-weight: 300;\n    color: #222222;\n    font-size: 12px;\n  }\n}\n\n@media screen and (min-width: 1024px) {\n  .form-area {\n    width: 60%;\n    margin-right: 0;\n    margin-top: 50px;\n    margin-bottom: 50px;\n  }\n\n  .resend-row {\n    margin-left: 0;\n    margin-right: 0;\n  }\n}\n\n.modal-container {\n  height: 430px;\n}\n\n.walletBalance {\n  background: #fbfbfb;\n  width: 100%;\n}\n\n.modal-btn {\n  position: absolute;\n  bottom: 5%;\n  width: 93%;\n}\n\n.sub-title {\n  font-weight: 500;\n  font-size: 18px;\n  margin-bottom: 5px;\n}\n\n.whydoyou {\n  font-size: 16px;\n  line-height: 120%;\n  font-weight: 500;\n  color: #222222;\n}\n\n.personal-cover {\n  background: #fbfbfb;\n  border-radius: 8px;\n}\n\n.email_notification_options_checkbox {\n\n  .email_notification_section {\n    margin-top: 4px;\n  }\n\n  .text-underline {\n    text-decoration: underline #666666 1px;\n  }\n\n  a.to-account-link {\n    color: #666666 !important;\n  }\n}\n</style>\n","export default class Email {\n  constructor(api, api2) {\n    this.http = api;\n    this.http2 = api2;\n  }\n\n  updateEmailNotificationPreferences(payload) {\n    return this.http2.post(\n      \"/v1/business/preferences/email-notification\",\n      payload\n    );\n  }\n}\n","import { render } from \"./preferences.vue?vue&type=template&id=12af92ae&scoped=true\"\nimport script from \"./preferences.vue?vue&type=script&lang=js\"\nexport * from \"./preferences.vue?vue&type=script&lang=js\"\n\nimport \"./preferences.vue?vue&type=style&index=0&id=12af92ae&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src612567107/src/new-merchant-app/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-12af92ae\"]])\n\nexport default __exports__\nimport QOptionGroup from 'quasar/src/components/option-group/QOptionGroup.js';\nimport QCheckbox from 'quasar/src/components/checkbox/QCheckbox.js';\nimport QList from 'quasar/src/components/item/QList.js';\nimport QItem from 'quasar/src/components/item/QItem.js';\nimport QItemSection from 'quasar/src/components/item/QItemSection.js';\nimport QItemLabel from 'quasar/src/components/item/QItemLabel.js';\nimport QCard from 'quasar/src/components/card/QCard.js';\nimport QCardSection from 'quasar/src/components/card/QCardSection.js';\nimport QToggle from 'quasar/src/components/toggle/QToggle.js';\nimport QSpinner from 'quasar/src/components/spinner/QSpinner.js';import Ripple from 'quasar/src/directives/Ripple.js';\nimport qInstall from \"../../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QOptionGroup,QCheckbox,QList,QItem,QItemSection,QItemLabel,QCard,QCardSection,QToggle,QSpinner});qInstall(script, 'directives', {Ripple});\n","import { render } from \"./preferences.vue?vue&type=template&id=2608d9da\"\nimport script from \"./preferences.vue?vue&type=script&lang=js\"\nexport * from \"./preferences.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"/codebuild/output/src612567107/src/new-merchant-app/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/vue-cli-plugin-quasar/lib/loader.vue.auto-import-quasar.js??ref--1-0!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-1!../../../../../node_modules/vue-loader-v16/dist/index.js??ref--1-2!./preferences.vue?vue&type=style&index=0&id=12af92ae&lang=scss&scoped=true\""],"sourceRoot":""}