{"version":3,"sources":["webpack:///./node_modules/core-js/modules/_strict-method.js","webpack:///./node_modules/core-js/modules/es6.array.sort.js","webpack:///./src/components/shared/company/TermDependentsModal.vue?0629","webpack:///src/components/shared/company/TermDependentsModal.vue","webpack:///./src/components/shared/company/TermDependentsModal.vue?c909","webpack:///./src/components/shared/company/TermDependentsModal.vue","webpack:///./src/components/shared/company/TermDependentsModal.vue?f88f"],"names":["fails","module","exports","method","arg","call","$export","aFunction","toObject","$sort","sort","test","P","F","undefined","comparefn","this","a","relationshipToConsumer","b","notifications","component","_vm","_h","$createElement","_c","_self","ref","attrs","modalTitle","staticClass","_v","_s","message","directives","name","rawName","value","expression","domProps","Array","isArray","primaryIsSelected","_i","on","$event","$$a","$$el","target","$$c","checked","$$i","concat","slice","toggleAllDependents","primary","participantName","_f","birthDate","_l","d","key","consumerId","isSelected","$set","disableTermDatePicker","composing","effEndDate","model","callback","$$v","staticStyle","closeModal","termDependents","options","__file"],"mappings":"0GACA,IAAIA,EAAQ,EAAQ,QAEpBC,EAAOC,QAAU,SAAUC,EAAQC,GACjC,QAASD,GAAUH,GAAM,WAEvBI,EAAMD,EAAOE,KAAK,MAAM,cAA6B,GAAKF,EAAOE,KAAK,W,oCCL1E,IAAIC,EAAU,EAAQ,QAClBC,EAAY,EAAQ,QACpBC,EAAW,EAAQ,QACnBR,EAAQ,EAAQ,QAChBS,EAAQ,GAAGC,KACXC,EAAO,CAAC,EAAG,EAAG,GAElBL,EAAQA,EAAQM,EAAIN,EAAQO,GAAKb,GAAM,WAErCW,EAAKD,UAAKI,QACLd,GAAM,WAEXW,EAAKD,KAAK,WAEL,EAAQ,OAAR,CAA4BD,IAAS,QAAS,CAEnDC,KAAM,SAAcK,GAClB,YAAqBD,IAAdC,EACHN,EAAMJ,KAAKG,EAASQ,OACpBP,EAAMJ,KAAKG,EAASQ,MAAOT,EAAUQ,Q,0GCpB7C,ICgGA,EA0BA,I,qEC1H2X,EDgG3X,CACE,KAAF,sBACE,WAAF,GACE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KAAKN,EAAG,MAAM,CAACK,YAAY,OAAO,CAACL,EAAG,MAAM,CAACK,YAAY,YAAYyC,YAAY,CAAC,aAAa,UAAU,CAAC9C,EAAG,YAAY,CAACK,YAAY,4CAA4CF,MAAM,CAAC,OAASN,EAAIkD,aAAa,CAAClD,EAAIS,GAAG,oDAAoDT,EAAIS,GAAG,KAAKN,EAAG,YAAY,CAACK,YAAY,gDAAgDF,MAAM,CAAC,OAASN,EAAImD,iBAAiB,CAACnD,EAAIS,GAAG,wDAAwD,OAAO,KAC/6E,IGSpB,EACA,KACA,WACA,MAIFV,EAAUqD,QAAQC,OAAS,0BACZ,UAAAtD,E,2CCpBf,uBAAshB","file":"js/vue-modals38.8ebb5431.js","sourcesContent":["'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n  return !!method && fails(function () {\n    // eslint-disable-next-line no-useless-call\n    arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n  });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n  // IE8-\n  test.sort(undefined);\n}) || !fails(function () {\n  // V8 bug\n  test.sort(null);\n  // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n  // 22.1.3.25 Array.prototype.sort(comparefn)\n  sort: function sort(comparefn) {\n    return comparefn === undefined\n      ? $sort.call(toObject(this))\n      : $sort.call(toObject(this), aFunction(comparefn));\n  }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ac-modal',{ref:\"modalRef\",attrs:{\"title\":_vm.modalTitle,\"size-class\":'modal-md'}},[[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"info-board info-board-blue\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-lg-12\"},[_c('p',{staticClass:\"text-primary\"},[_c('small',[_c('em',[_vm._v(\"\\n                                    \"+_vm._s(_vm.message)+\"\\n                                \")])])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"col-lg-12\"},[_c('table',{staticClass:\"table\"},[_c('thead',[_c('tr',[_c('th',[_vm._v(\"Select\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Name\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Relationship\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Birthdate\")])])]),_vm._v(\" \"),_c('tbody',[_c('tr',[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.primaryIsSelected),expression:\"primaryIsSelected\"}],staticClass:\"form-control select-checkbox\",attrs:{\"type\":\"checkbox\",\"id\":\"primary\",\"title\":\"Terminating Primary terminates entire family.\"},domProps:{\"checked\":Array.isArray(_vm.primaryIsSelected)?_vm._i(_vm.primaryIsSelected,null)>-1:(_vm.primaryIsSelected)},on:{\"change\":[function($event){var $$a=_vm.primaryIsSelected,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.primaryIsSelected=$$a.concat([$$v]))}else{$$i>-1&&(_vm.primaryIsSelected=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.primaryIsSelected=$$c}},_vm.toggleAllDependents]}})]),_vm._v(\" \"),_c('td',[_c('label',{attrs:{\"for\":\"primary\"}},[_vm._v(_vm._s(_vm.primary ?\n                                    _vm.primary.participantName\n                                    : ''))])]),_vm._v(\" \"),_c('td',[_c('p',[_vm._v(\"Primary\")])]),_vm._v(\" \"),_c('td',[_c('p',[_vm._v(_vm._s(_vm._f(\"shortDate\")(_vm.primary.birthDate)))])])]),_vm._v(\" \"),_vm._l((_vm.dependents),function(d){return _c('tr',{key:d.consumerId},[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(d.isSelected),expression:\"d.isSelected\"}],staticClass:\"form-control select-checkbox\",attrs:{\"type\":\"checkbox\",\"id\":'dependent-to-terminate-' + d.consumerId,\"disabled\":_vm.primaryIsSelected},domProps:{\"checked\":Array.isArray(d.isSelected)?_vm._i(d.isSelected,null)>-1:(d.isSelected)},on:{\"change\":function($event){var $$a=d.isSelected,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(d, \"isSelected\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(d, \"isSelected\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(d, \"isSelected\", $$c)}}}})]),_vm._v(\" \"),_c('td',[_c('label',{attrs:{\"for\":'dependent-to-terminate-' + d.consumerId}},[_vm._v(_vm._s(d.participantName))])]),_vm._v(\" \"),_c('td',[_c('p',[_vm._v(_vm._s(d.relationshipToConsumer))])]),_vm._v(\" \"),_c('td',[_c('p',[_vm._v(_vm._s(_vm._f(\"shortDate\")(d.birthDate)))])])])})],2)])]),_vm._v(\" \"),_c('div',[_c('div',{staticClass:\"col-lg-4 form-group\"},[_c('label',[_vm._v(\"\\n                        Termination Date\\n                        \"),_c('small',{staticClass:\"redText\"},[_vm._v(\"required\")])]),_c('br'),_vm._v(\" \"),(!_vm.disableTermDatePicker)?_c('ac-date-picker',{attrs:{\"useTodayAsDefault\":true},model:{value:(_vm.effEndDate),callback:function ($$v) {_vm.effEndDate=$$v},expression:\"effEndDate\"}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.effEndDate),expression:\"effEndDate\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"disabled\":true},domProps:{\"value\":(_vm.effEndDate)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.effEndDate=$event.target.value}}})],1)])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-12\",staticStyle:{\"text-align\":\"right\"}},[_c('ac-button',{staticClass:\"btn-sm btn-red wl-btn-failure button-size\",attrs:{\"action\":_vm.closeModal}},[_vm._v(\"\\n                    CANCEL\\n                \")]),_vm._v(\" \"),_c('ac-button',{staticClass:\"btn-sm btn-success wl-btn-success button-size\",attrs:{\"action\":_vm.termDependents}},[_vm._v(\"\\n                    TERMINATE\\n                \")])],1)])]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template v-if=\"widgetReady\">\n    <ac-modal :title=\"modalTitle\" :size-class=\"'modal-md'\" ref=\"modalRef\">\n        <template>\n            <div class=\"row\">\n                <div class=\"info-board info-board-blue\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <p class=\"text-primary\">\n                                <small>\n                                    <em>\n                                        {{ message }}\n                                    </em>\n                                </small>\n                            </p>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"col-lg-12\">\n                    <table class=\"table\">\n                        <thead>\n                            <tr>\n                                <th>Select</th>\n                                <th>Name</th>\n                                <th>Relationship</th>\n                                <th>Birthdate</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            <tr>\n                                <td>\n                                    <input type=\"checkbox\" class=\"form-control select-checkbox\" v-model=\"primaryIsSelected\"\n                                        id=\"primary\" @change=\"toggleAllDependents\"\n                                        title=\"Terminating Primary terminates entire family.\">\n                                </td>\n                                <td>\n                                    <label for=\"primary\">{{ primary ?\n                                        primary.participantName\n                                        : '' }}</label>\n                                </td>\n                                <td>\n                                    <p>Primary</p>\n                                </td>\n                                <td>\n                                    <p>{{ primary.birthDate | shortDate }}</p>\n                                </td>\n                            </tr>\n                            <tr v-for=\"d in dependents\" :key=\"d.consumerId\">\n                                <td>\n                                    <input type=\"checkbox\" class=\"form-control select-checkbox\" v-model=\"d.isSelected\"\n                                        :id=\"'dependent-to-terminate-' + d.consumerId\" :disabled=\"primaryIsSelected\">\n                                </td>\n                                <td>\n                                    <label :for=\"'dependent-to-terminate-' + d.consumerId\">{{ d.participantName }}</label>\n                                </td>\n                                <td>\n                                    <p>{{ d.relationshipToConsumer }}</p>\n                                </td>\n                                <td>\n                                    <p>{{ d.birthDate | shortDate }}</p>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </div>\n                <div>\n                    <div class=\"col-lg-4 form-group\">\n                        <label>\n                            Termination Date\n                            <small class=\"redText\">required</small>\n                        </label><br />\n                        <ac-date-picker v-model=\"effEndDate\" :useTodayAsDefault=\"true\" v-if=\"!disableTermDatePicker\"></ac-date-picker>\n                        <input v-else type=\"text\" class=\"form-control\" :disabled=\"true\" v-model=\"effEndDate\" />\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-md-12\" style=\"text-align: right;\">\n                    <ac-button class=\"btn-sm btn-red wl-btn-failure button-size\" :action=\"closeModal\">\n                        CANCEL\n                    </ac-button>\n                    <ac-button class=\"btn-sm btn-success wl-btn-success button-size\" :action=\"termDependents\">\n                        TERMINATE\n                    </ac-button>\n                </div>\n            </div>\n        </template>\n    </ac-modal>\n</template>\n\n<script>\n\nimport { api } from \"@/global/framework/api.js\";\nimport { configTables } from \"../../../global/configTables.js\";\nimport { notifications } from \"../../../global/notifications\";\nimport moment from 'moment';\n\nexport default {\n    name: \"TermDependentsModal\",\n    components: {},\n    data() {\n        return {\n            model: { companyId: 0, fullName: '', consumerId: 0 },\n            family: [],\n            primary: {},\n            primaryIsSelected: false,\n            dependents: [],\n            relationshipTypes: [],\n            widgetReady: false,\n            effEndDate: new Date(),\n            disableTermDatePicker: false\n        }\n    },\n    computed: {\n        modalTitle() {\n            return `Manage Members - ${this.model.fullName}`;\n        },\n        message() {\n            return `You are about to terminate ${this.model.fullName} or their family members.\n                      Doing so will take effect immediately and disable\n                      the member’s access to Accresa and its services.`\n        }\n    },\n    methods: {\n        async showModal({ companyId: companyId, consumerId: consumerId, fullName: fullName }) {\n            this.model = { companyId, consumerId, fullName };\n            this.family = await api.getDataWithTwoIds(\"Company\", companyId, \"GetFamily\", consumerId);\n\n            let employeeData = await api.getDataWithTwoIds(\"Company\", companyId, \"GetEditEmployeeModel\", consumerId);\n            console.log(\"Employee Data: \", {employeeData: employeeData});\n            if(employeeData.future && employeeData.future.consumerCoverageId > 0) {\n                this.effEndDate = new Date(employeeData.future.effectiveDate).toLocaleDateString();\n            }\n                      \n            this.primary = this.family.find(member => member.relationshipToConsumer === \"Primary\");\n            this.dependents = this.family.filter(member => member.relationshipToConsumer != \"Primary\" && member.isTerminated === false)\n            if (this.dependents.some(dependent => dependent.relationshipToConsumer === \"Spouse\")) {\n                this.dependents.sort((a, b) => {\n                    if (a.relationshipToConsumer === \"Spouse\") return -1;\n                    if (b.relationshipToConsumer === \"Spouse\") return 1;\n                    return 0;\n                })\n            }\n            if (this.primary) {\n                this.widgetReady = true;\n                this.$refs.modalRef.open();\n            }\n        },\n        closeModal() {\n            this.$emit(\"modal-closed\");\n            this.$refs.modalRef.close();\n        },\n        toggleAllDependents() {\n            this.dependents.forEach(d => {\n                if (this.primaryIsSelected) {\n                    d.isSelected = true;\n                }\n                else {\n                    d.isSelected = false;\n                }\n            })\n\n        },\n        async termDependents() {\n            if (!this.primaryIsSelected && this.dependents.every(d => !d.isSelected)) {\n                notifications.showError({ message: \"No members selected for termination.\", title: \"Error\" });\n                return;\n            }\n            if(moment(this.effEndDate).startOf('day').isBefore(moment().startOf('day'))){\n                notifications.showError({ message: \"The termination date must not be in the past.\", title: \"Error\" });\n                return;\n            }\n            let result;\n            if (this.primaryIsSelected) {\n                result = await api.post(\"Company\", \"TermEmployee\", { consumerId: this.primary.consumerId, effDate: this.effEndDate });\n            } else {\n                let selection = [];\n                for (let i = 0; i < this.dependents.length; i++) {\n                    if (this.dependents[i].isSelected) {\n                        this.dependents[i].company = {};\n                        this.dependents[i].company.companyId = this.model.companyId;\n                        this.dependents[i].primaryId = this.primary.consumerId;\n                        let relItem = _.find(this.relationshipTypes, (current) => {\n                            return current.relationType == this.dependents[i].relationshipToConsumer;\n                        });\n\n                        this.$set(this.dependents[i], 'relationshipToPrimary', relItem.relationshipsEnum);\n                        this.$set(this.dependents[i], 'effEndDate', this.effEndDate);\n                        selection.push(this.dependents[i]);\n                    }\n                }\n                result = await api.postDataAsJson(\"Company\", \"TermDependents\", selection);\n            }\n            this.closeModal();\n\n        }\n\n    },\n    async mounted() {\n        await configTables.getRelationshipsToPrimary()\n            .then((r) => this.relationshipTypes = r);\n    },\n}\n</script>\n\n<style scoped>\n.select-checkbox {\n    position: unset;\n    visibility: visible;\n    height: 20px;\n    width: 20px;\n    margin: 0px 0px 5px;\n}\n\ntr,\ntd,\nlabel {\n    vertical-align: unset !important;\n}\n\np {\n    margin: 0px 0px 5px;\n}\n</style>","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TermDependentsModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TermDependentsModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TermDependentsModal.vue?vue&type=template&id=a61bb838&scoped=true&v-if=widgetReady&\"\nimport script from \"./TermDependentsModal.vue?vue&type=script&lang=js&\"\nexport * from \"./TermDependentsModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TermDependentsModal.vue?vue&type=style&index=0&id=a61bb838&scoped=true&lang=css&\"\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  \"a61bb838\",\n  null\n  \n)\n\ncomponent.options.__file = \"TermDependentsModal.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TermDependentsModal.vue?vue&type=style&index=0&id=a61bb838&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TermDependentsModal.vue?vue&type=style&index=0&id=a61bb838&scoped=true&lang=css&\""],"sourceRoot":""}