{"version":3,"sources":["webpack:///./node_modules/quasar/src/components/form/QForm.js","webpack:///./src/views/Settings/add-member.vue","webpack:///./src/components/contents/SettingsLinks/addTeam.vue","webpack:///./src/components/contents/SettingsLinks/addTeam.vue?7c4b","webpack:///./src/views/Settings/add-member.vue?bdef","webpack:///./src/helpers/utils.js","webpack:///./src/components/contents/SettingsLinks/addTeam.vue?4776"],"names":["defineComponent","name","props","autofocus","Boolean","noErrorFocus","noResetFocus","greedy","onSubmit","Function","emits","setup","slots","emit","vm","getCurrentInstance","rootRef","ref","validateIndex","registeredComponents","validate","shouldFocus","promises","focus","emitEvent","res","i","length","comp","valid","then","push","error","Promise","resolve","index","all","errors","filter","r","resetValidation","forEach","submit","evt","stopAndPrevent","val","target","reset","nextTick","addFocusFn","value","querySelector","Array","prototype","find","call","querySelectorAll","el","tabIndex","provide","formKey","bindComponent","vmProxy","unbindComponent","indexOf","splice","onMounted","Object","assign","proxy","getValidationComponents","h","class","onReset","hSlot","default","_createElementBlock","_createVNode","_component_SettingsLinks","id","align","_hoisted_1","$data","loading","_createBlock","_component_q_btn","onClick","_cache","$event","$router","back","no-caps","textColor","flat","_createElementVNode","src","alt","_hoisted_2","_component_q_spinner","size","color","_component_q_form","$options","_component_TitleHeader","title","subtitle","_hoisted_3","_hoisted_4","_hoisted_5","_component_AppInput","label","placelabel","email","rules","_ctx","required","validEmail","lazy-rules","_hoisted_6","_component_AppSelect","selectedRole","options","getSelectRoleOptions","_hoisted_7","_component_TitleRole","role","_hoisted_8","_hoisted_9","_hoisted_10","_component_RoleCategory","category","allActivePermissions","selectedRolePermissions","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_component_AppButton","isSubmitting","type","width","disabled","sendInviteButtonState","components","TitleHeader","AppSelect","AppInput","TitleRole","AppButton","RoleCategory","mixins","authRulesMixin","data","roles","permissions","computed","business","this","$store","getters","_this$selectedRole","featureLists","map","roleName","form","values","some","x","methods","response","teamService","fetchPermissions","fetchRoles","_this$selectedRole2","storeTeamMember","businessId","inviteeEmail","inviteeRoleId","$mixpanel","track","platform","time","Date","showMessage","message","err","_err$response","errMsg","window","scrollTo","cleanTitle","str","snakeCaseToTitle","created","TeamService","$api1","$api2","__exports__","QBtn","QSpinner","QForm","SettingsLinks","render","groupBy","xs","key","reduce","rv","replace","split","word","toUpperCase","slice","toLowerCase","join","purposeCase","capitalizeFirstLetter","string","charAt","formatDate","_date","format","date","subtotal","items","total","item","quantity","price","calculateDiscount","discount_selected","discount","_subtotal","parseInt","grandTotal","details","shipping_fee","vat","discountAmount","truncateLengthyText","text","maxLength","substring"],"mappings":"gNAOeA,oCAAgB,CAC7BC,KAAM,QAENC,MAAO,CACLC,UAAWC,QACXC,aAAcD,QACdE,aAAcF,QACdG,OAAQH,QAERI,SAAUC,UAGZC,MAAO,CAAE,QAAS,qBAAsB,oBAExCC,MAAOT,GAAO,MAAEU,EAAK,KAAEC,IACrB,MAAMC,EAAKC,kCACLC,EAAUC,iBAAI,MAEpB,IAAIC,EAAgB,EACpB,MAAMC,EAAuB,GAE7B,SAASC,EAAUC,GACjB,MAAMC,EAAW,GACXC,EAA+B,mBAAhBF,EACjBA,GACuB,IAAvBnB,EAAMG,aAEVa,IAEA,MAAMM,EAAYA,CAACC,EAAKR,KACtBJ,EAAK,gBAAyB,IAARY,EAAe,UAAY,SAAUR,IAG7D,IAAK,IAAIS,EAAI,EAAGA,EAAIP,EAAqBQ,OAAQD,IAAK,CACpD,MAAME,EAAOT,EAAsBO,GAC7BG,EAAQD,EAAKR,WAEnB,GAA0B,oBAAfS,EAAMC,KACfR,EAASS,KACPF,EAAMC,KACJD,IAAS,CAAGA,QAAOD,SACnBI,IAAS,CAAGH,OAAO,EAAOD,OAAMI,iBAIjC,IAAc,IAAVH,EAAgB,CACvB,IAAqB,IAAjB3B,EAAMK,OAOR,OANAiB,GAAU,EAAOI,IAEH,IAAVL,GAAwC,oBAAfK,EAAKL,OAChCK,EAAKL,QAGAU,QAAQC,SAAQ,GAGz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sBA,CAACC,EAAMC,KAChC,OAAJD,QAAI,IAAJA,OAAI,EAAJA,EAAMtN,QAASuN,GACH,OAAJD,QAAI,IAAJA,OAAI,EAAJA,EAAME,UAAU,EAAGD,IAAtB,MACKD,G,kCCpKhB","file":"js/chunk-0132a8b8.18b046de.js","sourcesContent":["import { h, defineComponent, ref, onMounted, getCurrentInstance, nextTick, provide } from 'vue'\n\nimport { stopAndPrevent } from '../../utils/event.js'\nimport { addFocusFn } from '../../utils/private/focus-manager.js'\nimport { hSlot } from '../../utils/private/render.js'\nimport { formKey } from '../../utils/private/symbols.js'\n\nexport default defineComponent({\n name: 'QForm',\n\n props: {\n autofocus: Boolean,\n noErrorFocus: Boolean,\n noResetFocus: Boolean,\n greedy: Boolean,\n\n onSubmit: Function\n },\n\n emits: [ 'reset', 'validation-success', 'validation-error' ],\n\n setup (props, { slots, emit }) {\n const vm = getCurrentInstance()\n const rootRef = ref(null)\n\n let validateIndex = 0\n const registeredComponents = []\n\n function validate (shouldFocus) {\n const promises = []\n const focus = typeof shouldFocus === 'boolean'\n ? shouldFocus\n : props.noErrorFocus !== true\n\n validateIndex++\n\n const emitEvent = (res, ref) => {\n emit('validation-' + (res === true ? 'success' : 'error'), ref)\n }\n\n for (let i = 0; i < registeredComponents.length; i++) {\n const comp = registeredComponents[ i ]\n const valid = comp.validate()\n\n if (typeof valid.then === 'function') {\n promises.push(\n valid.then(\n valid => ({ valid, comp }),\n error => ({ valid: false, comp, error })\n )\n )\n }\n else if (valid !== true) {\n if (props.greedy === false) {\n emitEvent(false, comp)\n\n if (focus === true && typeof comp.focus === 'function') {\n comp.focus()\n }\n\n return Promise.resolve(false)\n }\n\n promises.push({ valid: false, comp })\n }\n }\n\n if (promises.length === 0) {\n emitEvent(true)\n return Promise.resolve(true)\n }\n\n const index = validateIndex\n\n return Promise.all(promises).then(\n res => {\n if (index === validateIndex) {\n const errors = res.filter(r => r.valid !== true)\n\n if (errors.length === 0) {\n emitEvent(true)\n return true\n }\n\n const { valid, comp } = errors[ 0 ]\n\n emitEvent(false, comp)\n\n if (\n focus === true\n && valid !== true\n && typeof comp.focus === 'function'\n ) {\n comp.focus()\n }\n\n return false\n }\n }\n )\n }\n\n function resetValidation () {\n validateIndex++\n\n registeredComponents.forEach(comp => {\n typeof comp.resetValidation === 'function' && comp.resetValidation()\n })\n }\n\n function submit (evt) {\n evt !== void 0 && stopAndPrevent(evt)\n\n validate().then(val => {\n if (val === true) {\n if (props.onSubmit !== void 0) {\n emit('submit', evt)\n }\n else if (evt !== void 0 && evt.target !== void 0 && typeof evt.target.submit === 'function') {\n evt.target.submit()\n }\n }\n })\n }\n\n function reset (evt) {\n evt !== void 0 && stopAndPrevent(evt)\n\n emit('reset')\n\n nextTick(() => { // allow userland to reset values before\n resetValidation()\n if (props.autofocus === true && props.noResetFocus !== true) {\n focus()\n }\n })\n }\n\n function focus () {\n addFocusFn(() => {\n if (rootRef.value === null) { return }\n\n const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')\n || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1)\n\n target !== null && target !== void 0 && target.focus()\n })\n }\n\n provide(formKey, {\n bindComponent (vmProxy) {\n registeredComponents.push(vmProxy)\n },\n\n unbindComponent (vmProxy) {\n const index = registeredComponents.indexOf(vmProxy)\n if (index > -1) {\n registeredComponents.splice(index, 1)\n }\n }\n })\n\n onMounted(() => {\n props.autofocus === true && focus()\n })\n\n // expose public methods\n Object.assign(vm.proxy, {\n validate,\n resetValidation,\n submit,\n reset,\n focus,\n getValidationComponents: () => registeredComponents\n })\n\n return () => h('form', {\n class: 'q-form',\n ref: rootRef,\n onSubmit: submit,\n onReset: reset\n }, hSlot(slots.default))\n }\n})\n","\n \n \n
\n\n\n\n ","\n \n
\n Go back\n \n
\n \n
\n
\n \n \n\n \n \n
\n\n \n\n \n \n
\n\n\n\n\n\n","import { render } from \"./addTeam.vue?vue&type=template&id=05322dcf&scoped=true\"\nimport script from \"./addTeam.vue?vue&type=script&lang=js\"\nexport * from \"./addTeam.vue?vue&type=script&lang=js\"\n\nimport \"./addTeam.vue?vue&type=style&index=0&id=05322dcf&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-05322dcf\"]])\n\nexport default __exports__\nimport QBtn from 'quasar/src/components/btn/QBtn.js';\nimport QSpinner from 'quasar/src/components/spinner/QSpinner.js';\nimport QForm from 'quasar/src/components/form/QForm.js';\nimport qInstall from \"../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QBtn,QSpinner,QForm});\n","import { render } from \"./add-member.vue?vue&type=template&id=002cad09\"\nimport script from \"./add-member.vue?vue&type=script&lang=js\"\nexport * from \"./add-member.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__","import date from 'quasar/src/utils/date.js';;\n/**\n * @param {Array} xs\n * @param {number | string} key\n * @returns any\n */\nexport const groupBy = function (xs, key) {\n return xs.reduce(function (rv, x) {\n (rv[x[key]] = rv[x[key]] || []).push(x);\n return rv;\n }, {});\n};\n\n/**\n * @param {String} str\n * @returns String\n */\nexport const snakeCaseToTitle = function (str) {\n return str\n .replace(\"_\", \" \")\n .split(\" \")\n .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const purposeCase = (value) => {\n switch (value) {\n case \"bank_transfer\":\n return \"Bank_transfer_outward\";\n case \"bill_payment\":\n return \"Bill_payment\";\n case \"card_funding\":\n return \"Card_funding\";\n case \"commission_feecase\":\n return \"Commission_fee\";\n case \"delivery_fee\":\n return \"Delivery_fee\";\n case \"item_purchase\":\n return \"Item_purchase\";\n case \"Lien_Credit\":\n return \"Lien_credit\";\n case \"payment_link\":\n return \"Payment_link\";\n case \"pos_funding\":\n return \"POS_terminal\";\n case \"product_sale\":\n return \"Product_sale\";\n case \"qr_code\":\n return \"QR_payment\";\n case \"reserved_bank_account_funding\":\n return \"Bank_transfer_inward\";\n case \"reversal\":\n return \"Reversal\";\n case \"stamp_duty_fee\":\n return \"Stamp_duty\";\n case \"transaction_fee\":\n return \"Transaction_fee\";\n case \"transaction_fee_bank_transfer\":\n return \"Transaction_fee_bank_transfer\";\n case \"transaction_fee_checkout\":\n return \"Transaction_fee_checkout\";\n case \"transaction_fee_payment_link\":\n return \"Transaction_fee_payment_link\";\n case \"transaction_fee_pos_funding\":\n return \"Transaction_fee_POS_terminal\";\n case \"transaction_fee_qr_code\":\n return \"Transaction_fee_QR_payment\";\n case \"transaction_fee_reserved_account\":\n return \"Transaction_fee_bank_transfer_inward\";\n case \"wallet_transfer\":\n return \"Wallet_transfer\";\n case \"Cash_offline\":\n return \"Cash_offline\";\n\n default:\n return value.replace(\"_\", \" \");\n }\n};\n\n/**\n *\n * @param {string} string\n * @returns string\n */\nexport const capitalizeFirstLetter = (string) => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\n/**\n *\n * @param {*} _date\n * @returns string\n */\nexport const formatDate = (_date, format = \"MMM DD, YYYY hh:mm A\") => {\n return date.formatDate(_date, format);\n};\n\n/**\n *\n * @param {string} string\n * @returns string\n */\nexport const createHash = async (string) => {\n const utf8 = new TextEncoder().encode(string);\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", utf8);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray\n .map((bytes) => bytes.toString(16).padStart(2, \"0\"))\n .join(\"\");\n return hashHex;\n};\n\n/**\n * @param {Array} items\n * @returns string || Number\n */\nexport const subtotal = (items) => {\n let total = 0;\n items.forEach((item) => {\n total += item.quantity * item.price;\n });\n\n return total;\n};\n\n/**\n * calculate discount\n * @param {Object} data\n * @return {Number}\n */\n\nexport const calculateDiscount = (data) => {\n const { discount_selected, discount, _subtotal } = data;\n let subtotal = _subtotal;\n return discount_selected === \"Fixed\"\n ? parseInt(discount)\n : parseInt(subtotal) * (parseInt(discount) / 100);\n};\n\n/**\n * @param {Object} details\n * @returns string || Number\n */\nexport const grandTotal = (details) => {\n const { shipping_fee, vat, discount, discount_selected, items } = details;\n let _subtotal = subtotal(items);\n let discountAmount = calculateDiscount({\n discount_selected: discount_selected,\n discount: discount,\n _subtotal: _subtotal,\n });\n return _subtotal + parseInt(shipping_fee) + parseInt(vat) - discountAmount;\n};\n\n/**\n * Truncate lenghty text.\n *\n * @param {string} text The text\n * @param {number} business_name The max length\n * @returns {string}\n */\nexport const truncateLengthyText = (text, maxLength) => {\n if (text?.length > maxLength) {\n return `${text?.substring(0, maxLength)}...`;\n } else return text;\n};\n","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!./addTeam.vue?vue&type=style&index=0&id=05322dcf&lang=scss&scoped=true\""],"sourceRoot":""}