{"version":3,"sources":["webpack:///./src/views/home/report-setting/ReportSetting.vue?c87d","webpack:///./src/composables/home/report-setting/reportSettingComposable.ts","webpack:///./src/views/home/report-setting/ReportSetting.vue"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_component_Dropdown","_component_InputIconRightGrey","_component_Paginator","id","modelValue","typeMenu","$event","options","name","optionLabel","optionValue","placeholder","onChange","filterChange","type","$enumBase","input","text","inputSearch","onKeypress","changeSearch","canClick","onSubmitInput","icon","$icon","svg","searchEva","data","item","index","key","src","iconPath","Type","toLowerCase","Title","Description","onClick","showDetailReportSetting","rows","filters","pageSize","totalRecords","onPage","setup","app","store","$toast","appContext","config","globalProperties","router","pageNumber","search","filterField","custom","getAllData","dispatch","getAll","response","console","log","error","add","severity","detail","message","group","life","result","Count","Data","value","val","getters","push","params","Id","event","page","__exports__"],"mappings":"uIAEMA,EAAa,CAAEC,MAAO,mDACtBC,EAAa,CAAED,MAAO,wDACtBE,EAAa,CAAEF,MAAO,iDACtBG,EAA0B,yBAAa,MAAO,CAAEH,MAAO,QAAU,CACxD,yBAAa,IAAK,CAAEA,MAAO,2BACtC,GACEI,EAAa,CAAEJ,MAAO,cACtBK,EAAa,CAAEL,MAAO,kDACtBM,EAAa,CAAEN,MAAO,wEACtBO,EAAa,CAAEP,MAAO,QAEtB,SAAUQ,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAsB,8BAAkB,YACxCC,EAAgC,8BAAkB,sBAClDC,EAAuB,8BAAkB,aAE/C,OAAQ,yBAAc,yBAAa,MAAO,KAAM,CAC9C,yBAAa,MAAOlB,EAAY,CAC9B,yBAAagB,EAAqB,CAChCG,GAAI,KACJC,WAAYV,EAAKW,SACjB,sBAAuBV,EAAO,KAAOA,EAAO,GAAK,SAACW,GAAD,OAAkBZ,EAAKW,SAAWC,IACnFC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BoE,OAAQ,CAAEzE,GAAIsE,EAAII,OAIlEhE,EAAe,SAAC4D,GACpBjC,EAAQe,OAAS,GACC,QAAdkB,EAAID,OACNhC,EAAQe,OAAOoB,KAAK,CAAC,OAAQ,IAAKF,EAAID,QAExChC,EAAQY,WAAa,EACrBI,KAGIb,EAAS,SAACmC,GACdtC,EAAQY,WAAa0B,EAAMC,KAAO,EAClCvB,KAOF,OAJA,wBAAU,WACRA,OAGK,CACL7B,OACAT,cACAc,WACAZ,eACAkB,0BACAjC,WACAQ,eACA2B,UACAG,Y,qBC9EN,MAAMqC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASvF,KAErD","file":"js/chunk-2d22d9c6.ff0cfecb.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, withKeys as _withKeys, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, toDisplayString as _toDisplayString } from \"vue\"\n\nconst _hoisted_1 = { class: \"flex p-col-12 p-md-4 p-3 bg-white mb-4 rounded \" }\nconst _hoisted_2 = { class: \"grid lg:grid-cols-3 md:grid-cols-3 grid-cols-2 gap-4\" }\nconst _hoisted_3 = { class: \"bg-white px-6 py-4 rounded-lg w-full relative\" }\nconst _hoisted_4 = /*#__PURE__*/_createVNode(\"div\", { class: \"pb-6\" }, [\n /*#__PURE__*/_createVNode(\"i\", { class: \"pi pi-users text-6xl\" })\n], -1)\nconst _hoisted_5 = { class: \"desc pb-4\" }\nconst _hoisted_6 = { class: \"font-bold mb-2 lg:text-xl md:text-xl text-base\" }\nconst _hoisted_7 = { class: \"color-blue-grey mb-5 lg:text-base md:text-base text-sm sm-truncate-2\" }\nconst _hoisted_8 = { class: \"mt-4\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Dropdown = _resolveComponent(\"Dropdown\")\n const _component_InputIconRightGrey = _resolveComponent(\"InputIconRightGrey\")\n const _component_Paginator = _resolveComponent(\"Paginator\")\n\n return (_openBlock(), _createBlock(\"div\", null, [\n _createVNode(\"div\", _hoisted_1, [\n _createVNode(_component_Dropdown, {\n id: \"id\",\n modelValue: _ctx.typeMenu,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_ctx.typeMenu = $event)),\n options: [{name: 'Semua', id: 'all'},{name: 'Excel', id: 'excel'}, {name: 'Report', id: 'report'}],\n class: \"dropdown-grey flex-shrink-0 text-sm w-1/3 sm:w-auto\",\n optionLabel: \"name\",\n optionValue: \"id\",\n placeholder: \"Pilih Tipe \",\n onChange: _ctx.filterChange\n }, null, 8, [\"modelValue\", \"onChange\"]),\n _createVNode(_component_InputIconRightGrey, {\n placeholder: \"Cari Disini ...\",\n type: _ctx.$enumBase.input.text,\n modelValue: _ctx.inputSearch,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_ctx.inputSearch = $event)),\n onKeypress: _cache[3] || (_cache[3] = _withKeys(($event: any) => (_ctx.changeSearch(_ctx.inputSearch)), [\"enter\"])),\n canClick: false,\n onSubmitInput: _cache[4] || (_cache[4] = ($event: any) => (_ctx.changeSearch(_ctx.inputSearch))),\n icon: _ctx.$icon.svg.searchEva\n }, null, 8, [\"type\", \"modelValue\", \"icon\"])\n ]),\n _createVNode(\"section\", _hoisted_2, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.data, (item, index) => {\n return (_openBlock(), _createBlock(\"div\", {\n class: \"flex w-full\",\n key: 'report-' + index\n }, [\n _createVNode(\"div\", _hoisted_3, [\n _createVNode(\"img\", {\n src: _ctx.iconPath,\n class: \"lg:w-18 md:w-16 w-10 mb-4\"\n }, null, 8, [\"src\"]),\n _hoisted_4,\n _createVNode(\"div\", _hoisted_5, [\n _createVNode(\"h6\", {\n class: [item.Type.toLowerCase() == 'excel' ? 'color-green-darken-1' : '', \"font-bold mb-1 lg:text-xl md:text-xl text-base\"]\n }, _toDisplayString(`${item.Type}`), 3),\n _createVNode(\"h6\", _hoisted_6, _toDisplayString(`${item.Title}`), 1),\n _createVNode(\"p\", _hoisted_7, \"Memberikan ijin untuk report \" + _toDisplayString(item.Description), 1)\n ]),\n _createVNode(\"p\", {\n class: \"cursor-pointer color-primary hover-primary font-bold lg:text-base md:text-base text-sm absolute bottom-4 w-full\",\n onClick: ($event: any) => (_ctx.showDetailReportSetting(item))\n }, \" Berikan Ijin \", 8, [\"onClick\"])\n ])\n ]))\n }), 128))\n ]),\n _createVNode(\"div\", _hoisted_8, [\n _createVNode(_component_Paginator, {\n rows: _ctx.filters.pageSize,\n totalRecords: _ctx.filters.totalRecords,\n onPage: _ctx.onPage\n }, null, 8, [\"rows\", \"totalRecords\", \"onPage\"])\n ])\n ]))\n}","import {\r\n ref, onMounted, getCurrentInstance, computed\r\n} from 'vue'\r\nimport { reportingUseCase } from '@/domain/usecase'\r\nimport { useRoute, useRouter } from 'vue-router'\r\nimport { useStore } from 'vuex'\r\n\r\nexport default {\r\n setup() {\r\n const app = getCurrentInstance()\r\n const store = useStore()\r\n const { $toast } = app!.appContext.config.globalProperties\r\n const data = ref([])\r\n const route = useRoute()\r\n const router = useRouter()\r\n const inputSearch = ref('')\r\n const iconPath = ref('')\r\n const typeMenu = ref('')\r\n const filters = {\r\n pageNumber: 1,\r\n pageSize: 10,\r\n totalRecords: 0,\r\n search: '',\r\n filterField: ['title'],\r\n custom: [] as any\r\n }\r\n const getAllData = async () => {\r\n store.dispatch('showLoading')\r\n ///\r\n const response = await reportingUseCase.getAll(filters)\r\n console.log('response', response)\r\n if (response.error) {\r\n $toast.add({\r\n severity: 'error', detail: response.message, group: 'bc', life: 3000\r\n })\r\n } else {\r\n filters.totalRecords = response.result.Count\r\n data.value = await response.result.Data\r\n }\r\n store.dispatch('hideLoading')\r\n }\r\n\r\n const changeSearch = (val: any) => {\r\n console.log('search val', val)\r\n filters.search = val\r\n filters.pageNumber = 1\r\n getAllData()\r\n }\r\n\r\n const showDetailReportSetting = (val: any) => {\r\n console.log('valDetail', val)\r\n if (store.getters['appActiveUser/getAgent']?.id) {\r\n router.push({ name: 'report-setting-data-detail', params: { id: val.Id } })\r\n }\r\n }\r\n\r\n const filterChange = (val: any) => {\r\n filters.custom = []\r\n if (val.value !== 'all') {\r\n filters.custom.push(['type', '=', val.value])\r\n }\r\n filters.pageNumber = 1\r\n getAllData()\r\n }\r\n\r\n const onPage = (event: any) => {\r\n filters.pageNumber = event.page + 1\r\n getAllData()\r\n }\r\n\r\n onMounted(() => {\r\n getAllData()\r\n })\r\n\r\n return {\r\n data,\r\n inputSearch,\r\n iconPath,\r\n changeSearch,\r\n showDetailReportSetting,\r\n typeMenu,\r\n filterChange,\r\n filters,\r\n onPage\r\n }\r\n }\r\n}\r\n","import { render } from \"./ReportSetting.vue?vue&type=template&id=68ecd8c4&ts=true\"\nimport script from \"@/composables/home/report-setting/reportSettingComposable.ts?vue&type=script&lang=ts\"\nexport * from \"@/composables/home/report-setting/reportSettingComposable.ts?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\Harapan Jaya\\\\hjex-web-agen\\\\node_modules\\\\@vue\\\\cli-service\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}