{"version":3,"sources":["webpack:///./src/views/CZFlexibleProcurement/CZPerformanceSummary.vue?2279","webpack:///./src/views/CZFlexibleProcurement/CZPerformanceSummary.vue","webpack:///./src/views/CZFlexibleProcurement/CZPerformanceSummary.vue?0478","webpack:///./src/core/helpers/breadcrumb.ts"],"names":["_hoisted_1","class","id","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","render","_ctx","_cache","$props","$setup","$data","$options","_component_apexchart","loading","ref","type","height","options","chartOptions","series","name","components","setup","chart","dataLabels","enabled","stroke","curve","width","show","markers","size","xaxis","labels","datetimeUTC","formatter","val","timestamp","Date","format","style","colors","yaxis","title","text","fontSize","legend","floating","getPerformanceSummary","store","getters","layoutConfig","value","AccountId","current","FPreportName","FPscenarioName","accountInfo","clientId","productId","reportId","scenarioId","iscurrent","ApiService","post","then","data","dayCostList","response","splice","push","map","a","date","mtm","market","baseline","catch","console","log","__exports__","setCurrentPageBreadcrumbs","pageTitle","breadcrumbs","dispatch","SET_BREADCRUMB_ACTION","pageBreadcrumbPath","setCurrentPageTitle"],"mappings":"uIAEMA,EAAa,CACjBC,MAAO,oBACPC,GAAI,2BAEAC,EAA0B,gCAAoB,MAAO,CAAEF,MAAO,8BAAgC,CACrF,gCAAoB,MAAO,CAAEA,MAAO,kBAAoB,CACtD,gCAAoB,KAAM,CAAEA,MAAO,iBAAmB,2BAEnE,GACEG,EAAa,CAAEH,MAAO,mBACtBI,EAAa,CAAEJ,MAAO,iBACtBK,EAAa,CAAEL,MAAO,YACtBM,EAAa,CAAEL,GAAI,SACnBM,EAA0B,gCAAoB,MAAO,CAAEP,MAAO,8BAAgC,CACrF,gCAAoB,MAAO,CAAEA,MAAO,8BAC/C,GAEG,SAASQ,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAuB,8BAAkB,aAE/C,OAAQ,yBAAc,gCAAoB,MAAO,CAC/Cf,MAAO,4BAAgB,CAAE,wBAAyBS,E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AA,KAAMC,QAAQC,aACjC,oCAGGM,EAAmB,CACtBC,SAAUL,EACVM,UAAW,EACXC,SAAUL,EACVM,WAAYL,EACZM,UAAWR,GAEbS,EAAA,KAAWC,KAAK,wCAAyCP,GACjDQ,MAAK,SAAO,G,IAAEC,EAAI,O,uHACL,SAAMA,EAAKC,a,cAAtBC,EAAW,SACjBjD,EAAOkD,OAAO,GAEdlD,EAAOmD,KAAK,CACVlD,KAAM,MACN8C,KAAME,EAASG,KAAI,SAACC,GAAM,OAAC,IAAIlC,KAAKkC,EAAEC,MAAOD,EAAEE,UAEjDvD,EAAOmD,KAAK,CACVlD,KAAM,eACN8C,KAAME,EAASG,KAAI,SAACC,GAAM,OAAC,IAAIlC,KAAKkC,EAAEC,MAAOD,EAAEG,aAEjDxD,EAAOmD,KAAK,CACVlD,KAAM,SACN8C,KAAME,EAASG,KAAI,SAACC,GAAM,OAAC,IAAIlC,KAAKkC,EAAEC,MAAOD,EAAEI,eAEjD/D,EAAQuC,OAAQ,E,cAEjByB,OAAM,SAACL,GACN3D,EAAQuC,OAAQ,EAChB0B,QAAQC,IAAI,gBAAiBP,MAGnC,OAhDArD,EAAOkD,OAAO,GAgDP,CACLlD,OAAM,EACND,aAAY,EACZL,QAAO,M,qBC3Hb,MAAMmE,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS3E,KAErD,gB,kCCPf,gGAQa4E,EAA4B,SACvCC,EACAC,GAEA,OAAMC,SAAS,OAAQC,sBAAuB,CAC5C1C,MAAOuC,EACPI,mBAAoBH,KAQXI,EAAsB,SAAC5C,GAClC,OAAMyC,SAAS,OAAQC,sBAAuB,CAC5C1C,MAAOA","file":"js/chunk-58c0bfd6.ae9cb252.js","sourcesContent":["import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n class: \"card mb-5 mb-xl-5\",\n id: \"kt_profile_details_view\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-header cursor-pointer\" }, [\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-title m-0\" }, [\n /*#__PURE__*/_createElementVNode(\"h3\", { class: \"fw-bolder m-0\" }, \"Performance Summary\")\n ])\n], -1)\nconst _hoisted_3 = { class: \"overlay-wrapper\" }\nconst _hoisted_4 = { class: \"card-body p-9\" }\nconst _hoisted_5 = { class: \"row mb-7\" }\nconst _hoisted_6 = { id: \"chart\" }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"overlay-layer bg-dark-o-25\" }, [\n /*#__PURE__*/_createElementVNode(\"div\", { class: \"spinner spinner-primary\" })\n], -1)\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_apexchart = _resolveComponent(\"apexchart\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass({ 'overlay overlay-block': _ctx.loading })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(_component_apexchart, {\n ref: \"chart\",\n type: \"line\",\n height: \"350\",\n options: _ctx.chartOptions,\n series: _ctx.series\n }, null, 8, [\"options\", \"series\"])\n ])\n ])\n ])\n ])\n ]),\n _hoisted_7\n ], 2))\n}","\nimport { defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport ApiService from \"@/core/services/ApiService\";\nimport moment from \"moment\";\nimport store from \"@/store\";\nimport { setCurrentPageBreadcrumbs } from \"@/core/helpers/breadcrumb\";\n\nexport default defineComponent({\n name: \"CZPerformanceSummary\",\n\n components: {},\n setup() {\n const chartOptions = {\n chart: {\n type: \"line\",\n height: 350,\n },\n dataLabels: {\n enabled: false,\n },\n stroke: {\n curve: \"straight\",\n width: 5,\n show: true,\n },\n markers: {\n size: 8,\n },\n\n xaxis: {\n type: \"datetime\",\n labels: {\n datetimeUTC: false,\n formatter: function (val, timestamp) {\n return moment(new Date(timestamp)).format(\"MMM DD\");\n },\n style: {\n colors: \"#9899ac\",\n },\n },\n },\n yaxis: {\n title: {\n text: \"£/MWh\",\n style: {\n fontSize: \"15px\",\n },\n },\n },\n legend: {\n show: true,\n floating: false,\n fontSize: \"20px\",\n },\n };\n onMounted(() => {\n setCurrentPageBreadcrumbs(\"Performance Summary\", [\n \"Flexible Procurement\",\n ]);\n getPerformanceSummary();\n });\n const loading = ref(false);\n\n /**\n *@description For auto refreshing the page on selection change\n */\n watch(\n () => [\n store.getters.layoutConfig(\"flexibleProcurement.scenarioName\"),\n store.getters.layoutConfig(\"flexibleProcurement.reportName\"),\n store.getters.layoutConfig(\"flexibleProcurement.current\"),\n ],\n function () {\n getPerformanceSummary();\n }\n );\n const series = reactive([{}]);\n series.splice(0);\n\n /**\n *@description For getting performance summary report\n */\n function getPerformanceSummary() {\n loading.value = true;\n\n let AccountId = store.getters.AccountId;\n let current = store.getters.layoutConfig(\"flexibleProcurement.current\");\n let FPreportName = store.getters.layoutConfig(\n \"flexibleProcurement.reportName\"\n );\n let FPscenarioName = store.getters.layoutConfig(\n \"flexibleProcurement.scenarioName\"\n );\n\n const accountInfo: any = {\n clientId: AccountId,\n productId: 4,\n reportId: FPreportName,\n scenarioId: FPscenarioName,\n iscurrent: current,\n };\n ApiService.post(\"api/FlexProcurement/getFlexProcrement\", accountInfo) \n .then(async ({ data }) => {\n const response = await data.dayCostList;\n series.splice(0);\n //Making the series with dynamic values\n series.push({\n name: \"MTM\",\n data: response.map((a) => [new Date(a.date), a.mtm]),\n });\n series.push({\n name: \"Market Price\",\n data: response.map((a) => [new Date(a.date), a.market]),\n });\n series.push({\n name: \"Budget\",\n data: response.map((a) => [new Date(a.date), a.baseline]),\n });\n loading.value = false;\n })\n .catch((a) => {\n loading.value = false;\n console.log(\"Api Log Error\", a);\n });\n }\n return {\n series,\n chartOptions,\n loading,\n };\n },\n});\n","import { render } from \"./CZPerformanceSummary.vue?vue&type=template&id=031a297c&ts=true\"\nimport script from \"./CZPerformanceSummary.vue?vue&type=script&lang=ts\"\nexport * from \"./CZPerformanceSummary.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\Develop\\\\WorkSpace\\\\Codebase\\\\EICPartnershipSVN\\\\UI_EICPartnership\\\\node_modules\\\\@vue\\\\cli-service\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import store from \"@/store\";\nimport { Actions } from \"@/store/enums/StoreEnums\";\n\n/**\n * Sets current page breadcrumbs\n * @param {string} pageTitle Current page title\n * @param {Array} breadcrumbs Current page breadcrumbs\n */\nexport const setCurrentPageBreadcrumbs = (\n pageTitle: string,\n breadcrumbs: Array\n): void => {\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\n title: pageTitle,\n pageBreadcrumbPath: breadcrumbs,\n });\n};\n\n/**\n * Sets current page breadcrumbs\n * @param {string} title Current page title name\n */\nexport const setCurrentPageTitle = (title: string): void => {\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\n title: title,\n });\n};\n"],"sourceRoot":""}