osmanli-veri-dagitim 2.1.55-dev → 2.1.57-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1870,7 +1870,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1870
1870
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1871
1871
|
|
|
1872
1872
|
"use strict";
|
|
1873
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerNo;\n console.log(this.veriDagitimModel);\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1873
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerId;\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && d.platform == null && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1874
1874
|
|
|
1875
1875
|
/***/ }),
|
|
1876
1876
|
|
|
@@ -8181,7 +8181,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
|
|
|
8181
8181
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8182
8182
|
|
|
8183
8183
|
"use strict";
|
|
8184
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.
|
|
8184
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n resolve(response);\n }\n }).catch(() => {\n resolve(false);\n });\n });\n },\n\n login({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n const invalidUserPasswordMsg = \"Geçersiz Kullanıcı Adı veya Şifre\";\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].login, _params).then(response => {\n if (response.data.error) {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n } else {\n commit(\"setToken\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"veri-dagitim-token\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"refreshToken\", response.data.refreshToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"userId\", response.data.loginInfo.id);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"username\", response.data.loginInfo.name);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n commit(\"setUserInfo\", response.data.loginInfo);\n commit(\"setUserNumber\", Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"getItem\"])(\"userNumber\"));\n const currentTime = new Date().getTime();\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"expirationDate\", currentTime + response.data.expiresIn);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setTimeoutExpire\"])(() => dispatch(\"logout\"));\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push({\n name: \"Home\"\n });\n resolve(true);\n }\n }).catch(() => {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n });\n });\n },\n\n logout({\n commit\n }) {\n commit(\"clearToken\");\n localStorage.removeItem(\"veri-dagitim-token\");\n localStorage.removeItem(\"refreshToken\");\n localStorage.removeItem(\"expirationDate\");\n localStorage.removeItem(\"userType\");\n localStorage.removeItem(\"userId\");\n localStorage.removeItem(\"cusNo\");\n localStorage.removeItem(\"username\");\n localStorage.removeItem(\"userNumber\");\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push(\"/login\").catch(() => {});\n }\n\n};\nconst getters = {\n getUserInfo(state) {\n return state.userInfo;\n },\n\n getUserNumber(state) {\n return state.userNumber;\n },\n\n getToken(state) {\n return state.token;\n },\n\n getErrorMsg(state) {\n return state.authErrorMessage;\n },\n\n getUserCusId(state) {\n return state.userCustomerId;\n }\n\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state,\n mutations,\n actions,\n getters\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/store/modules/auth.js?");
|
|
8185
8185
|
|
|
8186
8186
|
/***/ }),
|
|
8187
8187
|
|
|
@@ -1879,7 +1879,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1879
1879
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1880
1880
|
|
|
1881
1881
|
"use strict";
|
|
1882
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerNo;\n console.log(this.veriDagitimModel);\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1882
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerId;\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && d.platform == null && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1883
1883
|
|
|
1884
1884
|
/***/ }),
|
|
1885
1885
|
|
|
@@ -8190,7 +8190,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
|
|
|
8190
8190
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8191
8191
|
|
|
8192
8192
|
"use strict";
|
|
8193
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.
|
|
8193
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n resolve(response);\n }\n }).catch(() => {\n resolve(false);\n });\n });\n },\n\n login({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n const invalidUserPasswordMsg = \"Geçersiz Kullanıcı Adı veya Şifre\";\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].login, _params).then(response => {\n if (response.data.error) {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n } else {\n commit(\"setToken\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"veri-dagitim-token\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"refreshToken\", response.data.refreshToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"userId\", response.data.loginInfo.id);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"username\", response.data.loginInfo.name);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n commit(\"setUserInfo\", response.data.loginInfo);\n commit(\"setUserNumber\", Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"getItem\"])(\"userNumber\"));\n const currentTime = new Date().getTime();\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"expirationDate\", currentTime + response.data.expiresIn);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setTimeoutExpire\"])(() => dispatch(\"logout\"));\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push({\n name: \"Home\"\n });\n resolve(true);\n }\n }).catch(() => {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n });\n });\n },\n\n logout({\n commit\n }) {\n commit(\"clearToken\");\n localStorage.removeItem(\"veri-dagitim-token\");\n localStorage.removeItem(\"refreshToken\");\n localStorage.removeItem(\"expirationDate\");\n localStorage.removeItem(\"userType\");\n localStorage.removeItem(\"userId\");\n localStorage.removeItem(\"cusNo\");\n localStorage.removeItem(\"username\");\n localStorage.removeItem(\"userNumber\");\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push(\"/login\").catch(() => {});\n }\n\n};\nconst getters = {\n getUserInfo(state) {\n return state.userInfo;\n },\n\n getUserNumber(state) {\n return state.userNumber;\n },\n\n getToken(state) {\n return state.token;\n },\n\n getErrorMsg(state) {\n return state.authErrorMessage;\n },\n\n getUserCusId(state) {\n return state.userCustomerId;\n }\n\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state,\n mutations,\n actions,\n getters\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/store/modules/auth.js?");
|
|
8194
8194
|
|
|
8195
8195
|
/***/ }),
|
|
8196
8196
|
|
|
@@ -1879,7 +1879,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1879
1879
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1880
1880
|
|
|
1881
1881
|
"use strict";
|
|
1882
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerNo;\n console.log(this.veriDagitimModel);\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1882
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/breadcrumb */ \"./src/utils/breadcrumb.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins */ \"./src/mixins/index.js\");\n/* harmony import */ var _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/base/ScreenPrices.vue */ \"./src/components/base/ScreenPrices.vue\");\n\n\n\n\n\n\n\nconst ListViewSkeleton = () => __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! @/components/base/ListViewSkeleton */ \"./src/components/base/ListViewSkeleton.vue\"));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"CustomerDetail\",\n components: {\n CustomerInfo: _components__WEBPACK_IMPORTED_MODULE_1__[\"CustomerInfo\"],\n DataRequestItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataRequestItem\"],\n Pager: _components__WEBPACK_IMPORTED_MODULE_1__[\"Pager\"],\n FundCommissionRate: _components__WEBPACK_IMPORTED_MODULE_1__[\"FundCommissionRate\"],\n HistoryFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"HistoryFilter\"],\n DataHistoryItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataHistoryItem\"],\n InvoiceFilter: _components__WEBPACK_IMPORTED_MODULE_1__[\"InvoiceFilter\"],\n DataInvoiceItem: _components__WEBPACK_IMPORTED_MODULE_1__[\"DataInvoiceItem\"],\n BaseIcon: _components__WEBPACK_IMPORTED_MODULE_1__[\"BaseIcon\"],\n InfoArea: _components__WEBPACK_IMPORTED_MODULE_1__[\"InfoArea\"],\n ScreenPrices: _components_base_ScreenPrices_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ListViewSkeleton\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n } else {\n this.cusId = this.veriDagitimModel.userId;\n this.cusNo = this.veriDagitimModel.customerId;\n }\n\n this.fillFilter();\n this.getAllPackages(this.cusId);\n this.getRecommendedData();\n this.fillFilter();\n\n if (!this.veriDagitimModel) {\n localStorage.setItem(\"userCusId\", this.cusId);\n this.setUserCustomerId(this.cusId);\n this.getCustomer();\n } else {\n this.getCustomer();\n this.handleCustomer(this.veriDagitimModel);\n localStorage.setItem(\"esube\", \"yes\");\n localStorage.setItem(\"userId\", this.cusId);\n localStorage.setItem(\"cusNo\", this.cusNo);\n\n if (this.cusId) {\n let userIdAsNumber = parseInt(this.cusId);\n let payload = {\n id: userIdAsNumber\n };\n this.getMember(payload).then(response => {\n this.setUserInfo({ ...response.data.loginInfo,\n memberType: this.memberType\n });\n });\n }\n }\n },\n\n mixins: [_mixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n props: {\n veriDagitimModel: Object,\n memberType: {\n type: Number\n }\n },\n\n data() {\n return {\n recommendedPackages: null,\n getPaymentStatuses: [],\n currentCustomer: null,\n monthArr: _constants__WEBPACK_IMPORTED_MODULE_3__[\"monthArr\"],\n currentYearNumber: new Date().getFullYear(),\n currentMonthNumber: new Date().getMonth() + 1,\n countDown: 10,\n timerRunning: true,\n logsLoader: false,\n timerStatus: \"Yenileniyor\",\n screenPriceList: [],\n featureScreenPricesList: [],\n newScreenPrice: [],\n tabs: [{\n id: 0,\n text: \"Veri Paketlerim\"\n }, {\n id: 1,\n text: \"Veri Paketi Ekstrelerim\"\n }, {\n id: 3,\n text: \"Ekran Ücretleri\"\n }, {\n id: 4,\n text: \"Paket Talep Et\"\n }, {\n id: 2,\n text: \"Değişiklikler\"\n }],\n currentTab: 0,\n cusId: null,\n cusNo: null,\n isDataInvoiceLoaded: true,\n activeIndex: null,\n isActiveRow: false,\n isLoading: false,\n REQUESTED_PACKAGE_STATUS_ID: 6,\n SUCCESSFUL_INTEGRATION: true,\n UNSUCCESSFUL_INTEGRATION: false,\n EXCLUDED_APPLICATION_NAME: \"Foreks\"\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"apps\", \"profAlgoApps\", \"appsTab\", \"profAlgoTab\", \"fundAndCommissionRates\", \"customer\", \"allPackages\", \"getRecommendedPackages\", \"history\", \"historyList\", \"getFilterList\", \"invoiceList\", \"getHistoryFilter\", \"getUserInfo\"]),\n\n getUserType() {\n const REPRESENTATIVE_CODE = 3;\n const userType = this.getUserInfo.memberType;\n return userType && userType === REPRESENTATIVE_CODE;\n },\n\n customerId() {\n if (this.$route.params.customerNumber) {\n return this.$route.params.customerNumber;\n } else {\n return this.veriDagitimModel.customerId;\n }\n },\n\n getAllPackagesData() {\n return this.allPackages;\n },\n\n isCompleted() {\n return this.fundAndCommissionRates.fundAmount >= this.fundAndCommissionRates.targetFundAmount || this.fundAndCommissionRates.commissionAmount >= this.fundAndCommissionRates.targetCommissionAmount;\n }\n\n },\n\n created() {\n if (this.veriDagitimModel) {\n localStorage.setItem(\"veri-dagitim-token\", this.veriDagitimModel.token);\n }\n },\n\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"handleCustomer\", \"searchCustomer\", \"getAllPackages\", \"getRecommendedPackageList\", \"getHistoryList\", \"getInvoiceList\", \"getScreenPrices\", \"getFeatureScreenPrices\", \"getApps\", \"getAppsTab\", \"getProfAlgoTab\", \"getAllResearch\", \"getProfAlgoApps\", \"getMember\", \"fillFilter\"]),\n ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])([\"setGeneralFilter\", \"setMemberType\", \"setUserInfo\", \"setUserCustomerId\", \"setInvoiceFilter\", \"setHistoryFilter\", \"setProfAlgoApps\"]),\n\n tabClass(id) {\n return [{\n active: this.currentTab === id\n }, \"tab\"];\n },\n\n changeTab(id) {\n const ctrId = this.$route.params.customerId;\n this.currentTab = id;\n this.setGeneralFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.timerRunning = false;\n\n if (this.currentTab === 0) {\n this.getAllPackages(ctrId);\n this.timerRunning = true;\n this.countDown = 10;\n } else if (this.currentTab === 1) {\n this.setInvoiceFilter({\n page: 1,\n size: 5,\n filter: {\n Year: this.currentYearNumber.toString(),\n Month: this.currentMonthNumber.toString()\n }\n });\n this.getInvoiceList(ctrId);\n } else if (this.currentTab === 2) {\n this.setHistoryFilter({\n page: 1,\n size: 5,\n filter: {}\n });\n this.getHistoryList(ctrId);\n } else if (this.currentTab === 3) {\n this.screenPriceList = [];\n this.getFeatureScreenPrices().then(response => {\n response.forEach(element => {\n this.screenPriceList.push(element);\n });\n });\n } else if (this.currentTab === 4) {\n this.navigate();\n }\n },\n\n returnPriceTypeForScreenPrices(priceTypeNumber) {\n if (priceTypeNumber == 1) {\n return \"TL\";\n } else if (priceTypeNumber == 2) {\n return \"Dolar\";\n } else if (priceTypeNumber == 3) {\n return \"Euro\";\n }\n },\n\n navigate() {\n const params = {\n customerNumber: this.customerId,\n memberType: this.getUserType\n };\n const query = {};\n let cusId = this.$route.params.customerId;\n params.customerId = cusId !== undefined ? cusId : localStorage.getItem(\"userId\");\n query.c = params.customerId;\n query.m = params.memberType;\n this.$router.push({\n name: \"BuyDataPackage\",\n params,\n query\n });\n },\n\n getRecommendedData() {\n this.getRecommendedPackageList(this.cusId).then(res => {\n if (res) {\n this.recommendedPackages = this.getRecommendedPackages;\n }\n });\n },\n\n checkIsDataInvoiceFilterChangedAndLoaded(param) {\n this.isDataInvoiceLoaded = param;\n },\n\n getCustomer() {\n this.searchCustomer({\n customerNo: this.customerId,\n cusId: this.cusId\n }).then(res => {\n if (!res.statusCode) {\n Object(_utils_breadcrumb__WEBPACK_IMPORTED_MODULE_2__[\"getBreadCrumbs\"])({\n breadcrumbs: [\"CustomerDetail\"],\n customer: this.customer,\n customerDetail: this.customerId,\n cusId: this.cusId\n });\n const paymentStatuses = this.getFilterList.filter(o => {\n return o.name === \"PaymentStatus\";\n });\n if (paymentStatuses.length > 0) this.getPaymentStatuses = paymentStatuses[0].values;\n this.currentCustomer = this.customer;\n }\n });\n },\n\n toggleCountdown() {\n this.timerRunning = !this.timerRunning;\n\n if (!this.timerRunning) {\n this.timerStatus = \"Duraklatıldı\";\n } else {\n this.timerStatus = \"Yenileniyor.\";\n this.countDown = 10;\n }\n },\n\n timerChecker(isPopupOpened) {\n if (isPopupOpened) {\n this.timerRunning = false;\n } else {\n this.timerRunning = true;\n this.countDown = 10;\n }\n },\n\n subtitleRules(d) {\n let result = null;\n\n if (d.application != null && (d.application.id == 3 || d.application.id == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && d.platform == null && (d.application.id == 4 || d.application.id == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n },\n\n subtitleRulesInvoice(d) {\n let result = null;\n\n if (d.application != null && (d.application.applicationId == 3 || d.application.applicationId == 2)) {\n result = d.application.shortContent;\n } else if (d.research.length && d.application == null) {\n result = d.research[0].name;\n } else if (d.algorithm.length && (d.application.applicationId == 4 || d.application.applicationId == 7)) {\n result = d.algorithm[0].name;\n } else {\n result = d.platform.name;\n }\n\n return result;\n }\n\n },\n watch: {\n countDown: {\n handler(value) {\n if (this.currentTab == 0 && value >= -1) {\n if (this.timerRunning) {\n setTimeout(() => {\n this.countDown--;\n\n if (this.countDown === 0) {\n this.logsLoader = true;\n this.getAllPackages(this.$route.params.customerId);\n this.getRecommendedData();\n } else if (this.countDown === -1) {\n this.logsLoader = false;\n this.countDown = 10;\n }\n }, 1000);\n }\n }\n },\n\n immediate: true,\n deep: true\n },\n getAllPackagesData: {\n handler(value) {\n const allData = JSON.parse(JSON.stringify(value.data));\n const checkIsRequested = allData.filter(o => {\n var _o$application;\n\n return o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.SUCCESSFUL_INTEGRATION && ((_o$application = o.application) === null || _o$application === void 0 ? void 0 : _o$application.name) !== this.EXCLUDED_APPLICATION_NAME;\n });\n const checkisSuccessfulIntegration = allData.filter(o => o.packageStatus.id === this.REQUESTED_PACKAGE_STATUS_ID && o.isSuccessfulIntegration === this.UNSUCCESSFUL_INTEGRATION);\n this.timerRunning = (checkIsRequested.length > 0 ? true : false) || (checkIsRequested.length === checkisSuccessfulIntegration.length ? false : true);\n },\n\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/views/CustomerDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options");
|
|
1883
1883
|
|
|
1884
1884
|
/***/ }),
|
|
1885
1885
|
|
|
@@ -8190,7 +8190,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
|
|
|
8190
8190
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8191
8191
|
|
|
8192
8192
|
"use strict";
|
|
8193
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.
|
|
8193
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\n/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/axiosInstance */ \"./src/utils/axiosInstance.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/tokenTools */ \"./src/utils/tokenTools.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/router */ \"./src/router/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"./src/constants/index.js\");\n\n\n\n\n\nconst state = {\n token: \"\",\n authErrorMessage: \"\",\n userInfo: {\n memberType: 0\n },\n userNumber: \"\",\n userCustomerId: \"\"\n};\nconst mutations = {\n setToken(state, token) {\n state.token = token;\n },\n\n clearToken(state) {\n state.token = \"\";\n },\n\n setErrorMessage(state, payload) {\n state.authErrorMessage = payload;\n },\n\n setUserInfo(state, user) {\n state.userInfo = user;\n },\n\n setUserNumber(state, user) {\n state.userNumber = user;\n },\n\n setUserCustomerId(state, customerId) {\n state.userCustomerId = customerId;\n }\n\n};\nconst actions = {\n initAuth({\n commit\n }) {\n const token = localStorage.getItem(\"veri-dagitim-token\");\n const getCusId = localStorage.getItem(\"userCusId\");\n\n if (!token) {\n commit(\"setUserInfo\", localStorage.getItem(\"username\"));\n commit(\"setToken\", token);\n\n if (getCusId) {\n commit(\"setUserCustomerId\", parseInt(getCusId));\n }\n }\n },\n\n getMember({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n if (!_params.id) {\n dispatch(\"logout\");\n throw new Error(\"id error\");\n }\n\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].getMember, _params).then(response => {\n if (response.data.error) {\n resolve(false);\n } else {\n commit(\"setUserInfo\", response.data);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n resolve(response);\n }\n }).catch(() => {\n resolve(false);\n });\n });\n },\n\n login({\n commit,\n dispatch\n }, _params) {\n return new Promise(resolve => {\n const invalidUserPasswordMsg = \"Geçersiz Kullanıcı Adı veya Şifre\";\n Object(_utils_axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"post\"])(_constants__WEBPACK_IMPORTED_MODULE_4__[\"ENDPOINTS\"].login, _params).then(response => {\n if (response.data.error) {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n } else {\n commit(\"setToken\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"veri-dagitim-token\", response.data.accessToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"refreshToken\", response.data.refreshToken);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"userId\", response.data.loginInfo.id);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"cusNo\", response.data.customerId);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"username\", response.data.loginInfo.name);\n\n if (response.data.loginInfo.memberType == 3) {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"yes\");\n } else {\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"esube\", \"no\");\n }\n\n commit(\"setErrorMessage\", \"\");\n commit(\"setUserInfo\", response.data.loginInfo);\n commit(\"setUserNumber\", Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"getItem\"])(\"userNumber\"));\n const currentTime = new Date().getTime();\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setItem\"])(\"expirationDate\", currentTime + response.data.expiresIn);\n Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_2__[\"setTimeoutExpire\"])(() => dispatch(\"logout\"));\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push({\n name: \"Home\"\n });\n resolve(true);\n }\n }).catch(() => {\n commit(\"setErrorMessage\", invalidUserPasswordMsg);\n resolve(false);\n });\n });\n },\n\n logout({\n commit\n }) {\n commit(\"clearToken\");\n localStorage.removeItem(\"veri-dagitim-token\");\n localStorage.removeItem(\"refreshToken\");\n localStorage.removeItem(\"expirationDate\");\n localStorage.removeItem(\"userType\");\n localStorage.removeItem(\"userId\");\n localStorage.removeItem(\"cusNo\");\n localStorage.removeItem(\"username\");\n localStorage.removeItem(\"userNumber\");\n _router__WEBPACK_IMPORTED_MODULE_3__[\"default\"].push(\"/login\").catch(() => {});\n }\n\n};\nconst getters = {\n getUserInfo(state) {\n return state.userInfo;\n },\n\n getUserNumber(state) {\n return state.userNumber;\n },\n\n getToken(state) {\n return state.token;\n },\n\n getErrorMsg(state) {\n return state.authErrorMessage;\n },\n\n getUserCusId(state) {\n return state.userCustomerId;\n }\n\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state,\n mutations,\n actions,\n getters\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/store/modules/auth.js?");
|
|
8194
8194
|
|
|
8195
8195
|
/***/ }),
|
|
8196
8196
|
|