{"version":3,"sources":["webpack:///./src/pages/manage/client-web-orders/id.vue?2012","webpack:///./src/pages/manage/client-web-orders/id.vue","webpack:///./src/pages/manage/client-web-orders/id.vue?3ee3","webpack:///./src/pages/manage/client-web-orders/id.vue?cf0b","webpack:///./src/pages/manage/client-web-orders/id.vue?6f20","webpack:///./src/components/attached-file-viewer.vue?5ec6","webpack:///./src/components/attached-file-viewer.vue","webpack:///./src/components/attached-file-viewer.vue?7613","webpack:///./src/components/attached-file-viewer.vue?88ec","webpack:///./src/components/attached-file-viewer.vue?730f"],"names":["attrs","_vm","scopedSlots","key","fn","staticClass","name","_c","tag","property","_v","dataSource","attachedFiles","staticRenderFns","visibleProperties","Home","Vue","constructor","ObjectDataSource","id","this","$route","params","config","className","getInstaceStateName","_this$dataSource$meta","_this$dataSource$meta2","properties","metadata","cb","p","some","n","filter","sort","priority","getInstaceStateColor","instanceStateId","_this$dataSource$mode","text","to","exact","model","disabled","__decorate","Component","components","AttachedFileViewer","component","render","_self","_setupProxy","_l","files","file","on","$event","showOrDownload","getFileComponent","getFileSrc","_s","fileName","fileSize","imageUrls","index","_e","FileViewer","substring","lastIndexOf","isImage","ext","includes","_this$images","_this$images$findInde","data","axios","get","responseType","url","window","URL","createObjectURL","link","document","createElement","href","body","appendChild","click","removeChild","images","findIndex","call","f","_this$files","_this$files$filter","_this$images2","_this$images2$map","map","Prop","VueGallerySlideshow","mixins","FileMixin"],"mappings":"kKAAA,W,mFCAyF,EAAU,W,IAAaA,EAAM,K,EAAC,QAAa,GAAiB,QAAcC,Y,OAAe,eAACC,OAAqBC,YAAU,cAACC,cAAG,EAAU,Y,YAA4B,O,cAAU,WAAC,MAAM,WAA0FC,OAA2BJ,KAAQA,K,CAA0DE,EAAG,OAAUG,GAAI,iE,YAAY,cAAmB,GAAI,GAAC,EAAK,+B,OAACD,OAAY,CAAmB,IAAK,EAAQ,KAA+CA,YAAY,mBAAqB,CAACE,EAAI,MAAyBC,YAAI,oBAAYR,GAAK,IAAC,uC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AAhBA,EAAAL,KAAAI,EAAoBH,GAAW,wBAAwBA,EAAE3E,aA5B1D0B,eAAA,CAAPuD,kB,4BADkBjC,EAAUtB,eAAA,CAJ9BC,eAAU,CACTC,WAAY,CAAEsD,yBACdC,OAAQ,CAACC,WAEUpC,WCTyX,I,wBCQ1YlB,EAAY,eACd,EACAC,EACArC,GACA,EACA,KACA,WACA,MAIa,OAAAoC,E","file":"js/chunk-0c012691.ad47073d.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./id.vue?vue&type=style&index=0&id=88221f06&prod&lang=scss\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('data-item',{attrs:{\"breadcrumbs\":_vm.breadcrumbs,\"data-source\":_vm.dataSource},scopedSlots:_vm._u([{key:\"body\",fn:function(){return [_c('v-card',{attrs:{\"tile\":\"\"}},[_c('v-card-text',[_c('h1',[_vm._v(\"Заявка № \"+_vm._s(_vm.dataSource.model.id))]),_c('table',{staticClass:\"order-form\"},[_vm._l((_vm.visibleProperties),function(property){return _c('tr',{key:property.name,staticClass:\"order-form__row\"},[_c('td',{staticClass:\"order-form__name\"},[_c('b',[_vm._v(_vm._s(property.caption)+\":\")])]),_c('td',{staticClass:\"order-form__value\"},[_c(`inline-editor-readonly`,{tag:\"component\",attrs:{\"data-source\":_vm.dataSource,\"field\":property}})],1)])}),_c('tr',{staticClass:\"order-form__row\"},[_c('td',{staticClass:\"order-form__name\"},[_c('b',[_vm._v(\"Статус:\")])]),_c('td',{staticClass:\"order-form__value\"},[_c('v-chip',{attrs:{\"small\":\"\",\"label\":\"\",\"color\":_vm.getInstaceStateColor(_vm.dataSource.model.instanceStateId)}},[_vm._v(\" \"+_vm._s(_vm.getInstaceStateName(_vm.dataSource.model.instanceStateId))+\" \")])],1)]),(_vm.dataSource.model.attachedFiles.length > 0)?_c('tr',{staticClass:\"order-form__row\"},[_c('td',{staticClass:\"order-form__name\"},[_c('b',[_vm._v(\"Связанные файлы:\")])]),_c('td',{staticClass:\"order-form__value\"},[_c('attached-file-viewer',{attrs:{\"files\":_vm.dataSource.model.attachedFiles}})],1)]):_vm._e()],2)])],1)]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Vue, Component } from \"vue-property-decorator\";\nimport { ObjectDataSource } from \"@/data/Object/ObjecDatatSource\";\nimport AttachedFileViewer from \"@/components/attached-file-viewer.vue\";\nimport { getInstaceStateName } from \"@/cms-services/helpers\";\nconst visibleProperties = [\n \"id\",\n \"userName\",\n \"phone\",\n \"email\",\n \"url\",\n \"title\",\n \"companyName\",\n \"date\",\n \"comment\",\n \"folderId\",\n\n \"createDate\",\n \"lastUpdate\",\n];\n@Component({\n components: { AttachedFileViewer },\n})\nexport default class Home extends Vue {\n dataSource: ObjectDataSource = new ObjectDataSource({\n id: +this.$route.params.id,\n config: {},\n className: \"ClientWebOrder\",\n });\n\n get visibleProperties(): any {\n const properties = this.dataSource.metadata?.properties ?? [];\n const cb = (p) => visibleProperties.some((n) => p.name === n);\n return properties.filter(cb).sort((p, n) => p.priority - n.priority);\n }\n\n getInstaceStateName: any = getInstaceStateName;\n\n getInstaceStateColor(instanceStateId) {\n return instanceStateId === 4 ? \"success\" : \"warning\";\n }\n\n get breadcrumbs() {\n return [\n {\n text: \"Главная\",\n to: \"/\",\n },\n {\n text: \"Онлайн заявки\",\n to: \"/manage/client-web-orders/\",\n exact: true,\n },\n {\n text: this.dataSource.model?.id,\n disabled: true,\n },\n ];\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./id.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./id.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./id.vue?vue&type=template&id=88221f06\"\nimport script from \"./id.vue?vue&type=script&lang=ts\"\nexport * from \"./id.vue?vue&type=script&lang=ts\"\nimport style0 from \"./id.vue?vue&type=style&index=0&id=88221f06&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./attached-file-viewer.vue?vue&type=style&index=0&id=5fabc05d&prod&lang=scss&scoped=true\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',[_c('div',{staticClass:\"d-flex\"},_vm._l((_vm.files),function(file){return _c('div',{key:file.id,staticClass:\"file\",on:{\"click\":function($event){return _vm.showOrDownload(file)}}},[_c(_vm.getFileComponent(file),{tag:\"component\",staticClass:\"mb-2\",attrs:{\"src\":_vm.getFileSrc(file)}}),_c('div',[_vm._v(_vm._s(file.fileName))]),_c('div',[_vm._v(_vm._s(file.fileSize))])],1)}),0),(_vm.imageUrls)?_c('vue-gallery-slideshow',{attrs:{\"images\":_vm.imageUrls,\"index\":_vm.index},on:{\"close\":function($event){_vm.index = null}}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Vue, Component, Prop } from \"vue-property-decorator\";\nimport FileMixin from \"@/mixins/file-types/index\";\nimport axios from \"axios\";\nimport VueGallerySlideshow from \"vue-gallery-slideshow\";\n@Component({\n components: { VueGallerySlideshow },\n mixins: [FileMixin],\n})\nexport default class FileViewer extends Vue {\n @Prop() files!: any[];\n index: any = null;\n\n async showOrDownload(file: any) {\n const isImage = this.isImage(file.fileName);\n if (!isImage) {\n const { data } = await axios.get(\n `/attachedfile/${file.id}/file/?download=true`,\n {\n responseType: \"blob\",\n },\n );\n const url = window.URL.createObjectURL(data);\n var link = document.createElement(\"a\");\n link.href = url;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n return;\n }\n this.index = this.images?.findIndex?.((f: any) => f.id == file.id);\n }\n\n get images() {\n return this.files?.filter?.((f: any) => this.isImage(f.fileName));\n }\n\n get imageUrls() {\n return this.images?.map?.((f: any) => `/api/v1/attachedfile/${f.id}/file`);\n }\n\n getFileComponent = (file: any) => {\n switch (file.fileName.substring(file.fileName.lastIndexOf(\".\") + 1)) {\n case \"jpg\":\n case \"JPG\":\n case \"JPEG\":\n case \"jpeg\":\n return \"img\";\n case \"pdf\":\n return \"pdf\";\n case \"docx\":\n case \"doc\":\n return \"docx\";\n case \"xlsx\":\n return \"xlsx\";\n case \"txt\":\n return \"txt\";\n case \"pptx\":\n case \"ppt\":\n return \"pptx\";\n case \"mp3\":\n return \"mp3\";\n case \"zip\":\n case \"rar\":\n return \"zip\";\n default:\n return \"file\";\n }\n };\n\n isImage = (fileName: string) => {\n const ext = fileName.substring(fileName.lastIndexOf(\".\") + 1);\n return [\"jpg\", \"JPG\", \"JPEG\", \"jpeg\", \"png\"].includes(ext);\n };\n\n getFileSrc = (file: any) => {\n return this.isImage(file.fileName)\n ? `/api/v1/attachedfile/${file.id}/file`\n : null;\n };\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./attached-file-viewer.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./attached-file-viewer.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./attached-file-viewer.vue?vue&type=template&id=5fabc05d&scoped=true\"\nimport script from \"./attached-file-viewer.vue?vue&type=script&lang=ts\"\nexport * from \"./attached-file-viewer.vue?vue&type=script&lang=ts\"\nimport style0 from \"./attached-file-viewer.vue?vue&type=style&index=0&id=5fabc05d&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5fabc05d\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}