osmanli-veri-dagitim 2.1.62-dev → 2.1.63-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.
|
@@ -1750,7 +1750,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1750
1750
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1751
1751
|
|
|
1752
1752
|
"use strict";
|
|
1753
|
-
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(1, 1);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1753
|
+
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(0, 0);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1754
1754
|
|
|
1755
1755
|
/***/ }),
|
|
1756
1756
|
|
|
@@ -1759,7 +1759,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1759
1759
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1760
1760
|
|
|
1761
1761
|
"use strict";
|
|
1762
|
-
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(1, 1);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1762
|
+
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(0, 0);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1763
1763
|
|
|
1764
1764
|
/***/ }),
|
|
1765
1765
|
|
|
@@ -1759,7 +1759,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex
|
|
|
1759
1759
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1760
1760
|
|
|
1761
1761
|
"use strict";
|
|
1762
|
-
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(1, 1);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1762
|
+
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 _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PackageSettingSelect.vue */ \"./src/components/customer/PackageSettingSelect.vue\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components */ \"./src/components/index.js\");\n/* harmony import */ var _utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/tokenTools */ \"./src/utils/tokenTools.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"PackageSettingType\",\n components: {\n PackageSettingSelect: _PackageSettingSelect_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n BaseSelect: _components__WEBPACK_IMPORTED_MODULE_2__[\"BaseSelect\"]\n },\n props: {\n dataItem: Object,\n platformInfo: Object,\n selectData: Array,\n item: Object,\n isResponsive: Boolean\n },\n\n data() {\n return {\n isHighlighted: false,\n perspectiveData: [],\n distributionData: [],\n packageFeatureSelected: {},\n isPerspectiveShow: false,\n isDistributionShow: false,\n uuid: new Date().getTime(),\n selectedMarketID: null,\n defaultPerspectiveID: null,\n defaultDistrubitionID: null,\n cusId: null,\n showSelectbox: false,\n currentDate: new Date(),\n esube: Object(_utils_tokenTools__WEBPACK_IMPORTED_MODULE_3__[\"getItem\"])(\"esube\"),\n startDateSelection: -1,\n overallLimit: 0,\n startDate: [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }]\n };\n },\n\n computed: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])([\"getPerspectiveInfo\", \"getDistributionInfo\", \"getUserInfo\", \"getOverallLimit\", \"customerBefore\", \"allPackages\", \"customer\"]),\n\n itemParse() {\n return JSON.stringify(this.item);\n },\n\n getMemberType() {\n return this.getUserInfo.memberType;\n },\n\n isUserRegisteredBeforeTwentieth() {\n const accountOpeningDate = this.customer.accountOpeningDate;\n const registrationDate = this.parseDate(accountOpeningDate);\n const getLastDayOfMonth = this.parseDateCheckLastDay(registrationDate);\n return registrationDate.getFullYear() === this.currentDate.getFullYear() && registrationDate.getMonth() === this.currentDate.getMonth() && registrationDate.getDate() >= 20 && !getLastDayOfMonth;\n }\n\n },\n methods: { ...Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])([\"getPerspective\", \"getDistribution\", \"monthlyGetOverallLimit\"]),\n\n getOverallLimitOnLoad() {\n this.monthlyGetOverallLimit().then(response => {\n if (response.status === 200) {\n this.overallLimit = response.data.overallLimit;\n }\n });\n },\n\n loadPerspectiveSelect(e) {\n const dataValue = JSON.parse(e.target.getAttribute(\"data-value\"));\n this.isHighlighted = false;\n if (this.isPerspectiveShow) this.isPerspectiveShow = false;\n if (this.isDistributionShow) this.isDistributionShow = false;\n\n if (e.target.checked) {\n if (this.esube == \"yes\" && this.customer.overall != undefined) {\n this.setProductRule(this.customer);\n }\n\n this.isHighlighted = true;\n this.showSelectbox = true;\n this.getPerspective([this.dataItem.applicationId, this.dataItem.platform.id, e.target.value, this.cusId]).then(data => {\n if (this.getPerspectiveInfo.length > 0) {\n this.perspectiveData = data;\n this.selectedMarketID = e.target.value;\n this.defaultPerspectiveID = null;\n this.defaultDistrubitionID = null;\n this.isPerspectiveShow = true;\n this.loadDistributionSelect();\n this.fillData(dataValue, this.perspectiveData[0]);\n this.checkSelectedData();\n } else {\n this.fillData(dataValue, null);\n this.checkSelectedData();\n }\n });\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", true);\n }\n } else {\n this.showSelectbox = false;\n\n if (dataValue.name === \"Hisse + VİOP\") {\n this.$emit(\"showSpesificWarning\", false);\n }\n\n this.$emit(\"update\", this.selectData.filter(item => {\n var _item$marketFeature;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature = item.marketFeature) === null || _item$marketFeature === void 0 ? void 0 : _item$marketFeature.id) !== dataValue.id;\n }));\n }\n },\n\n loadDistributionSelect() {\n this.getDistribution([this.dataItem.applicationId, this.dataItem.platform.id, this.selectedMarketID, this.cusId]).then(data => {\n if (this.getDistributionInfo.length > 0) {\n this.distributionData = data;\n this.isDistributionShow = true;\n this.packageFeatureSelected.vendorFeature = this.distributionData[0];\n }\n });\n },\n\n changeStartDate(value) {\n this.startDateSelection = value.code;\n this.packageFeatureSelected.dateSelection = value.code;\n this.checkSelectedData();\n },\n\n changePerspective(value) {\n this.uuid = new Date().getTime();\n this.packageFeatureSelected.perspectiveFeature = value;\n this.checkSelectedData();\n },\n\n changeDistribution(value) {\n this.packageFeatureSelected.vendorFeature = value;\n this.defaultDistrubitionID = value.id;\n this.checkSelectedData();\n },\n\n fillData(marketFeature, perspectiveFeature, vendorFeature = {}) {\n this.packageFeatureSelected.packageId = this.dataItem.id;\n this.packageFeatureSelected.marketFeature = marketFeature;\n this.packageFeatureSelected.platformFeature = this.platformInfo;\n this.packageFeatureSelected.perspectiveFeature = perspectiveFeature;\n this.packageFeatureSelected.vendorFeature = vendorFeature;\n this.packageFeatureSelected.dateSelection = this.startDateSelection;\n },\n\n parseDate(dateString) {\n const [day, month, year, time] = dateString.split(/\\/|\\s/);\n const [hours, minutes, seconds] = time.split(\":\");\n return new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`);\n },\n\n parseDateCheckLastDay(dateString) {\n const year = dateString.getFullYear(),\n month = dateString.getMonth(),\n day = this.currentDate.getDate(),\n getLastDate = new Date(year, month + 1, -1).getDate();\n return day === getLastDate;\n },\n\n checkSelectedData() {\n const findData = this.selectData.find(item => {\n var _item$marketFeature2;\n\n return (item === null || item === void 0 ? void 0 : (_item$marketFeature2 = item.marketFeature) === null || _item$marketFeature2 === void 0 ? void 0 : _item$marketFeature2.id) === this.packageFeatureSelected.marketFeature.id;\n });\n\n if (findData) {\n const newData = { ...findData,\n ...this.packageFeatureSelected\n };\n const lastData = this.selectData.map(item => {\n if (item.marketFeature.id === newData.marketFeature.id) {\n return newData;\n }\n\n return item;\n });\n this.$emit(\"update\", lastData);\n } else {\n this.selectData.push(this.packageFeatureSelected);\n this.$emit(\"update\", this.selectData);\n }\n },\n\n setStartDates(listType, startDateSelections) {\n if (listType == -1) {\n this.startDate = [{\n label: \"Seçiniz\",\n code: -1\n }, {\n label: \"Hemen\",\n code: 0\n }, {\n label: \"Ay Başında\",\n code: 1\n }];\n } else if (listType == 0) {\n this.startDate = [{\n label: \"Hemen\",\n code: 0\n }];\n } else if (listType == 1) {\n this.startDate = [{\n label: \"Ay Başında\",\n code: 1\n }];\n }\n\n this.startDateSelection = startDateSelections;\n },\n\n setProductRule(val) {\n if (val && !val.error) {\n const overall = parseInt(val === null || val === void 0 ? void 0 : val.overall);\n\n if ((this.item.applicationId == 3 || this.item.applicationId == 2) && this.item.marketId == 3) {\n if (this.currentDate.getDate() >= 20 && this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(0, 0);\n } else if (this.currentDate.getDate() < 20 && !this.isUserRegisteredBeforeTwentieth && overall > this.overallLimit) {\n this.setStartDates(-1, -1);\n }\n } else {\n this.setStartDates(-1, -1);\n }\n }\n }\n\n },\n\n mounted() {\n if (this.$route.params.customerId !== undefined) {\n this.cusId = this.$route.params.customerId;\n }\n }\n\n});\n\n//# sourceURL=webpack://OsmanliPackage/./src/components/customer/PackageSettingCreateType.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");
|
|
1763
1763
|
|
|
1764
1764
|
/***/ }),
|
|
1765
1765
|
|