{"version":3,"sources":["webpack:///./src/views/bankaccounts/BankAccountTransfer.vue?b315","webpack:///./src/models/bankaccounts/BankAccountTransferRequestModel.ts","webpack:///./src/views/bankaccounts/BankAccountTransfer.vue","webpack:///./src/views/bankaccounts/BankAccountTransfer.vue?eadf","webpack:///./src/views/bankaccounts/BankAccountTransfer.vue?94a1"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","name","_v","params","bankAccountId","authorized","_e","ref","model","value","callback","$$v","bankAccountName","expression","_f","sourceBankBalance","scopedSlots","_u","key","fn","on","_g","transferDate","transferDateMenu","$event","funds","transferFromRules","item","_s","fundName","balance","transferFrom","bankAccounts","transferToRules","transferTo","transferAmountRules","transferAmount","processing","saveClick","_l","e","index","staticRenderFns","sourceFundId","targetBankAccountId","result","amountRules","fund","find","x","fundId","parseFloat","$store","state","selectedBankAccount","authorizedOperations","BankAccountOperations","TRANSFER","resetInitializationValues","api","MemberApi","getBankAccountsAsync","member","jwt","response","filter","Date","format","handleInitializationErrorAsync","initializing","isFormValid","resetProcessingValues","request","BankAccountsApi","transferAsync","$router","push","toString","handleProcessingErrorAsync","form","$refs","bankAccountTransferForm","validate","initializationError","ViewBase","default","required","component","VAlert","VBtn","VCard","VCardText","VCardTitle","VCol","VContainer","VDatePicker","VForm","VIcon","VMenu","VProgressCircular","VRow","VSelect","VTextField"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACA,EAAG,QAAQ,CAACE,MAAM,CAAC,QAAU,WAAW,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,GAAK,KAAK,GAAK,IAAI,GAAK,IAAI,GAAK,MAAM,CAACF,EAAG,cAAc,CAACG,YAAY,OAAOD,MAAM,CAAC,GAAK,CAACE,KAAM,wBAAwB,CAACR,EAAIS,GAAG,mBAAmBL,EAAG,SAAS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,OAAOpC,KAAK0D,OAAOC,MAAMC,oBAAoB7B,UArErD,GAAiD2D,EAAA,MAE7C,gBADC,eAAK,CAACC,QAAS,EAAGC,UAAU,K,oCADZ,EAAmB,gBAJvC,eAAU,CACHrF,KAAM,yBAGO,WCzG2Y,I,yMCO5ZsF,EAAY,eACd,EACA/F,EACAkD,GACA,EACA,KACA,KACA,MAIa,aAAA6C,EAAiB,QAmBhC,IAAkBA,EAAW,CAACC,SAAA,KAAOC,OAAA,KAAKC,QAAA,KAAMC,UAAA,OAAUC,WAAA,OAAWC,OAAA,KAAKC,aAAA,KAAWC,cAAA,KAAYC,QAAA,KAAMC,QAAA,KAAMC,QAAA,KAAMC,oBAAA,KAAkBC,OAAA,KAAKC,UAAA,KAAQC,aAAA","file":"js/chunk-2d0cc246.3c0d2494.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',[_c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"12\",\"xs\":\"12\",\"sm\":\"9\",\"md\":\"9\",\"lg\":\"6\"}},[_c('router-link',{staticClass:\"mr-2\",attrs:{\"to\":{name: 'memberbankaccounts'}}},[_vm._v(\"Bank Accounts\")]),_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-forward\")]),_c('router-link',{staticClass:\"ml-2\",attrs:{\"to\":{name: 'bankaccountdashboard', params:{bankAccountId: _vm.bankAccountId}}}},[_vm._v(\"Bank Account\")])],1)],1),_c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"12\",\"xs\":\"12\",\"sm\":\"9\",\"md\":\"9\",\"lg\":\"6\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline justify-center\"},[_vm._v(\"TRANSFER\")]),_c('v-card-text',{staticClass:\"mt-2 black--text\"},[(!_vm.authorized)?_c('div',{staticClass:\"text-center\"},[_c('v-alert',{attrs:{\"type\":\"error\",\"outlined\":\"\"}},[_vm._v(\"Transfer is not authorized.\")])],1):_vm._e(),(_vm.authorized)?_c('div',[(_vm.initializing)?_c('div',{staticClass:\"text-center\"},[_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}})],1):_vm._e(),(_vm.initializationError)?_c('div',{staticClass:\"text-center\"},[_c('v-alert',{attrs:{\"type\":\"error\",\"outlined\":\"\"}},[_vm._v(\"An error occurred while processing the request.\")])],1):_vm._e(),(_vm.showTransfer)?_c('div',[_c('v-form',{ref:\"bankAccountTransferForm\",staticClass:\"px-3\"},[_c('v-text-field',{staticClass:\"mt-3 mb-3\",attrs:{\"label\":\"Transfer From Bank Account\",\"prepend-icon\":\"mdi-bank\",\"disabled\":\"\"},model:{value:(_vm.bankAccountName),callback:function ($$v) {_vm.bankAccountName=$$v},expression:\"bankAccountName\"}}),_c('v-text-field',{staticClass:\"mt-3 mb-3\",attrs:{\"label\":\"Transfer From Bank Account Balance\",\"value\":_vm._f(\"formatCurrency\")(_vm.sourceBankBalance),\"prepend-icon\":\"mdi-cash-100\",\"disabled\":\"\",\"placeholder\":\"0.00\"}}),_c('v-menu',{attrs:{\"close-on-content-click\":false,\"nudge-right\":40,\"transition\":\"scale-transition\",\"offset-y\":\"\",\"min-width\":\"290px\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-text-field',_vm._g({attrs:{\"label\":\"Transfer Date\",\"prepend-icon\":\"mdi-calendar\",\"readonly\":\"\"},model:{value:(_vm.transferDate),callback:function ($$v) {_vm.transferDate=$$v},expression:\"transferDate\"}},on))]}}],null,false,1155232734),model:{value:(_vm.transferDateMenu),callback:function ($$v) {_vm.transferDateMenu=$$v},expression:\"transferDateMenu\"}},[_c('v-date-picker',{on:{\"input\":function($event){_vm.transferDateMenu = false}},model:{value:(_vm.transferDate),callback:function ($$v) {_vm.transferDate=$$v},expression:\"transferDate\"}})],1),_c('v-select',{attrs:{\"items\":_vm.funds,\"label\":\"Transfer From Fund\",\"prepend-icon\":\"mdi-wallet\",\"rules\":[_vm.transferFromRules],\"item-value\":\"fundId\"},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.fundName)+\" - \"+_vm._s(_vm._f(\"formatCurrency\")(item.balance))+\" \")]}},{key:\"selection\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.fundName)+\" - \"+_vm._s(_vm._f(\"formatCurrency\")(item.balance))+\" \")]}}],null,false,329420476),model:{value:(_vm.transferFrom),callback:function ($$v) {_vm.transferFrom=$$v},expression:\"transferFrom\"}}),_c('v-select',{attrs:{\"items\":_vm.bankAccounts,\"label\":\"Transfer To Bank Account\",\"prepend-icon\":\"mdi-bank\",\"rules\":[_vm.transferToRules],\"item-value\":\"bankAccountId\"},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.bankAccountName)+\" - \"+_vm._s(_vm._f(\"formatCurrency\")(item.balance))+\" \")]}},{key:\"selection\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.bankAccountName)+\" - \"+_vm._s(_vm._f(\"formatCurrency\")(item.balance))+\" \")]}}],null,false,361811932),model:{value:(_vm.transferTo),callback:function ($$v) {_vm.transferTo=$$v},expression:\"transferTo\"}}),_c('v-text-field',{staticClass:\"mt-3 mb-3\",attrs:{\"label\":\"Transfer Amount\",\"type\":\"number\",\"maxlength\":\"15\",\"prepend-icon\":\"mdi-cash-100\",\"rules\":[_vm.transferAmountRules],\"placeholder\":\"0.00\"},model:{value:(_vm.transferAmount),callback:function ($$v) {_vm.transferAmount=$$v},expression:\"transferAmount\"}}),_c('div',{staticClass:\"text-center\"},[_c('v-btn',{staticClass:\"primary\",attrs:{\"loading\":_vm.processing},on:{\"click\":_vm.saveClick}},[_vm._v(\"SAVE\")])],1),(_vm.processingError)?_c('div',{staticClass:\"text-center mt-4\"},_vm._l((_vm.processingErrors),function(e,index){return _c('div',{key:index},[_c('v-alert',{attrs:{\"value\":true,\"type\":\"error\",\"outlined\":\"\"}},[_vm._v(_vm._s(e))])],1)}),0):_vm._e()],1)],1):_vm._e()]):_vm._e()])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nexport default class BankAccountTransferRequestModel {\r\n public sourceFundId: number = 0;\r\n public targetBankAccountId: number = 0;\r\n public transferDate?: Date;\r\n public transferAmount: number = 0;\r\n}\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport moment from 'moment';\r\nimport {Component, Prop, Vue} from 'vue-property-decorator';\r\nimport ViewBase from '@/views/ViewBase';\r\nimport {BankAccountOperations} from '@/enums/BankAccountOperations';\r\nimport BankAccountsApi from '@/apis/BankAccountsApi';\r\nimport MemberApi from '@/apis/MemberApi';\r\nimport MemberBankAccountResponseModel from '@/models/member/MemberBankAccountResponseModel';\r\nimport BankAccountTransferRequestModel from '@/models/bankaccounts/BankAccountTransferRequestModel';\r\nimport BankAccountFundResponseModel from '@/models/bankaccounts/BankAccountFundResponseModel';\r\n\r\n@Component({\r\n name: 'BankAccountTransfer',\r\n },\r\n)\r\nexport default class BankAccountTransfer extends ViewBase {\r\n @Prop({default: 0, required: true})\r\n public bankAccountId!: number;\r\n\r\n public authorized: boolean = false;\r\n public bankAccounts: MemberBankAccountResponseModel[] = [];\r\n public transferAmount: string = '';\r\n public transferDate: string = '';\r\n public transferDateMenu: boolean = false;\r\n public transferFrom: number = 0;\r\n public transferTo: number = 0;\r\n\r\n public get showTransfer(): boolean {\r\n if ( !this.initializing && !this.initializationError ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public transferAmountRules(value: string): any {\r\n const result = this.amountRules(value, false);\r\n\r\n if ( result === true ) {\r\n if ( this.transferFrom > 0) {\r\n const fund = this.funds.find((x: BankAccountFundResponseModel) => x.fundId === this.transferFrom);\r\n\r\n if ( fund ) {\r\n if ( parseFloat(value) > fund.balance ) {\r\n return 'Amount may not exceed the transfer from balance.';\r\n }\r\n }\r\n else {\r\n return 'The selected fund could not be found.';\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n else {\r\n return result;\r\n }\r\n }\r\n\r\n public transferFromRules(value: number): any {\r\n if ( value === 0) {\r\n return 'A fund is required.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public transferToRules(value: number): any {\r\n if ( value === 0) {\r\n return 'A bank account is required.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public get bankAccountName(): string {\r\n return this.$store.state.selectedBankAccount.bankAccountName;\r\n }\r\n\r\n public get sourceBankBalance(): number {\r\n return this.$store.state.selectedBankAccount.balance;\r\n }\r\n\r\n public get funds(): BankAccountFundResponseModel[] {\r\n return this.$store.state.selectedBankAccount.funds;\r\n }\r\n\r\n public async created() {\r\n if ( this.$store.state.selectedBankAccount.authorizedOperations & BankAccountOperations.TRANSFER )\r\n {\r\n this.authorized = true;\r\n\r\n try {\r\n this.resetInitializationValues();\r\n\r\n const api = new MemberApi();\r\n const response: MemberBankAccountResponseModel[] = await api.getBankAccountsAsync(this.$store.state.member.jwt);\r\n\r\n // filter out the current bank account\r\n this.bankAccounts = response.filter((x: MemberBankAccountResponseModel) => x.bankAccountId !== this.bankAccountId);\r\n this.transferDate = moment(new Date()).format('YYYY-MM-DD');\r\n }\r\n catch ( err ) {\r\n await this.handleInitializationErrorAsync(err);\r\n }\r\n finally {\r\n this.initializing = false;\r\n }\r\n\r\n }\r\n }\r\n\r\n public async saveClick() {\r\n\r\n if ( this.isFormValid() ) {\r\n try {\r\n this.resetProcessingValues();\r\n\r\n const request = new BankAccountTransferRequestModel();\r\n request.sourceFundId = this.transferFrom;\r\n request.targetBankAccountId = this.transferTo;\r\n request.transferDate = new Date(this.transferDate);\r\n request.transferAmount = parseFloat(this.transferAmount);\r\n\r\n const api = new BankAccountsApi();\r\n await api.transferAsync(this.bankAccountId, this.$store.state.member.jwt, request);\r\n\r\n await this.$router.push({name: 'bankaccountdashboard', params: { bankAccountId: this.bankAccountId.toString(10)}});\r\n }\r\n catch ( err ) {\r\n await this.handleProcessingErrorAsync(err);\r\n }\r\n finally {\r\n this.processing = false;\r\n }\r\n }\r\n }\r\n\r\n private isFormValid(): boolean {\r\n const form: any = this.$refs.bankAccountTransferForm;\r\n\r\n return form.validate();\r\n }\r\n\r\n}\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BankAccountTransfer.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BankAccountTransfer.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./BankAccountTransfer.vue?vue&type=template&id=98eacb56&\"\nimport script from \"./BankAccountTransfer.vue?vue&type=script&lang=ts&\"\nexport * from \"./BankAccountTransfer.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAlert } from 'vuetify/lib/components/VAlert';\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDatePicker } from 'vuetify/lib/components/VDatePicker';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VAlert,VBtn,VCard,VCardText,VCardTitle,VCol,VContainer,VDatePicker,VForm,VIcon,VMenu,VProgressCircular,VRow,VSelect,VTextField})\n"],"sourceRoot":""}