{"version":3,"sources":["webpack:///./src/views/modules/product/FeatureForm.vue?31aa","webpack:///./src/views/modules/product/TypeFeatureDialog.vue?5672","webpack:///src/views/modules/product/TypeFeatureDialog.vue","webpack:///./src/views/modules/product/TypeFeatureDialog.vue?fbad","webpack:///./src/views/modules/product/TypeFeatureDialog.vue","webpack:///src/views/modules/product/FeatureForm.vue","webpack:///./src/views/modules/product/FeatureForm.vue?6fc3","webpack:///./src/views/modules/product/FeatureForm.vue","webpack:///./src/services/modules/product/TypeFeature.service.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","noOptionAdd","on","onTypeFeatureDialog","currentPage","singularTitle","t","pageTitle","command","status","generalErrors","checkErrorsComponent","name","pageFormIsLoaded","onSubmit","scopedSlots","_u","key","fn","ref","model","value","form","callback","$$v","$set","expression","error","typeFeatureOptions","search","$event","addNoOption","_v","openDialogForm","proxy","userAuth","entityFieldCustomized","featureId","pageId","fieldKey","staticClass","directives","rawName","availableAllGroups","_l","family","groupId","_s","groupLabel","selectGroup","options","item","groupsProduct","find","a","groupProductId","addGroupSelected","text","staticRenderFns","title","okText","id","showModal","resetModal","components","mixins","pageDialogFormMixin","data","typeFeatureId","note","methods","watch","component","pageDefaultMixin","path","genKey","enableGeneralFields","groupProductOptions","mountedPrepare","checked","el","indexRemove","itemInserted","push","service","params","http","list"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACA,EAAG,oBAAoB,CAACE,MAAM,CAAC,gBAAgBN,EAAIO,aAAaC,GAAG,CAAC,SAAWR,EAAIS,uBAAuBL,EAAG,cAAc,CAACE,MAAM,CAAC,cAAc,GAAG,cAAcN,EAAIU,YAAYC,cAAc,MAAQX,EAAIY,EAAE,WAAWZ,EAAIU,YAAYG,UAAU,QAAUb,EAAIc,QAAQ,OAASd,EAAIe,OAAO,cAAgBf,EAAIgB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3C,OAAQ,GAEVkB,MAAO,CACLf,KAAM,IAIRX,YAAa,GACb2B,mBAAoB,GACpBiD,oBAAqB,KAIzBP,QAAS,CAEPQ,eAFJ,aAKI,iBALJ,WAKA,wKAEA,+CACA,wBADA,uBAGA,uBAHA,IAGA,6DACA,WADA,IACA,0CACA,cAFA,gCAHA,kCASA,gDAXA,uBAcA,sCACA,0BACA,gDAhBA,OAmBA,sBAnBA,8CAsBI,SA3BJ,WA2BA,2JAGA,2DAHA,gBAIA,sMAJA,sCAMA,sBANA,8CAaItB,iBAxCJ,SAwCA,KAEM,GAAIuB,EAAS,CAEX,IAAR,2EACkB,MAANC,GACZ,8BAAU,eAAV,QACA,CAEQ,IAAR,gFAEYC,GAAe,GAC3B,sCAMIhC,YA1DJ,SA0DA,4BAEA,GAFA,IAEA,0CACA,kCAHA,gCAQI9C,oBAlEJ,SAkEA,GAEMR,KAAK2B,KAAK8C,cAAgBc,EAAa7D,MACvC1B,KAAKiC,mBAAmBuD,KAAKD,KAOjC,QA1GF,WA0GA,+JAEA,mBAFA,SAIA,qBAJA,uBAMA,qBANA,+CCtNmX,ICO/W,EAAY,eACd,EACAzF,EACAiE,GACA,EACA,KACA,KACA,MAIa,e,mFCfTgB,EAAO,uBAEPU,E,gGAEF,SAAWC,GACP,OAAOC,OAAKC,KAAKb,EAAO,cAAcW,O,KAM/B,WAAID","file":"js/chunk-1fd884b4.b4261f96.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('t-page',[_c('TypeFeatureDialog',{attrs:{\"no-option-add\":_vm.noOptionAdd},on:{\"onSubmit\":_vm.onTypeFeatureDialog}}),_c('t-page-form',{attrs:{\"multi-cards\":\"\",\"submit-text\":_vm.currentPage.singularTitle,\"title\":_vm.t('form-of')+_vm.currentPage.pageTitle,\"command\":_vm.command,\"status\":_vm.status,\"generalErrors\":_vm.generalErrors,\"check-errors-again\":_vm.checkErrorsComponent,\"go-back-title\":_vm.t('go-back-list'),\"go-back-to\":_vm.currentPage.name,\"busy\":!_vm.pageFormIsLoaded},on:{\"onSubmit\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar status = ref.status;\nreturn [_c('t-input',{attrs:{\"hidden\":\"\"},model:{value:(_vm.form.featureId),callback:function ($$v) {_vm.$set(_vm.form, \"featureId\", $$v)},expression:\"form.featureId\"}}),_c('t-form-card',{attrs:{\"title\":\"Dados Básicos\"}},[_c('t-input',{attrs:{\"add-error\":_vm.error.name,\"label\":\"Nome\",\"required\":\"\"},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, \"name\", $$v)},expression:\"form.name\"}}),_c('t-input',{attrs:{\"options\":_vm.typeFeatureOptions,\"label\":\"Tipo de CaracterÃstica\",\"select\":\"\",\"required\":\"\"},scopedSlots:_vm._u([{key:\"no-options\",fn:function(ref){\nvar search = ref.search;\nreturn [_c('b-link',{on:{\"click\":function($event){return _vm.addNoOption('modal-type-feature',search)}}},[_vm._v(\"Cadastrar Tipo\")])]}},{key:\"input-group-append\",fn:function(){return [_c('t-button',{attrs:{\"title\":\"Adicionar novo tipo\",\"icon-plus\":\"\"},on:{\"click\":function($event){return _vm.openDialogForm('modal-type-feature')}}})]},proxy:true}],null,true),model:{value:(_vm.form.typeFeatureId),callback:function ($$v) {_vm.$set(_vm.form, \"typeFeatureId\", $$v)},expression:\"form.typeFeatureId\"}}),_c('t-page-form-field-customized',{attrs:{\"command\":_vm.command,\"status\":status,\"user-auth\":_vm.userAuth,\"fields-customizable\":_vm.entityFieldCustomized('page'),\"primary-key\":_vm.form.featureId,\"foreign-key\":_vm.currentPage.pageId,\"busy\":!_vm.pageFormIsLoaded,\"primary-key-column\":_vm.fieldKey,\"foreign-key-column\":\"pageId\"}}),_c('t-input',{attrs:{\"label\":\"Observações\",\"max-length\":\"500\",\"textarea\":\"\"},model:{value:(_vm.form.note),callback:function ($$v) {_vm.$set(_vm.form, \"note\", $$v)},expression:\"form.note\"}}),_c('t-input-status',{model:{value:(_vm.form.status),callback:function ($$v) {_vm.$set(_vm.form, \"status\", $$v)},expression:\"form.status\"}})],1),_c('t-form-card',{attrs:{\"title\":\"Grupos de produtos\",\"icon-folder\":\"\"}},[_c('b-form-checkbox',{staticClass:\"col-sm-12 ml-2\",attrs:{\"switch\":\"\"},model:{value:(_vm.form.availableAllGroups),callback:function ($$v) {_vm.$set(_vm.form, \"availableAllGroups\", $$v)},expression:\"form.availableAllGroups\"}},[_vm._v(\" Disponibilizar esta caracterÃstica a todos os grupos de produtos? \"),_c('t-help',{attrs:{\"title\":\"Você poderá especificar quais os produtos podem utilizar esta caracterÃstica, basta desmarcar esta opção e selecionar os grupos de produtos desejados.\"}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.form.availableAllGroups),expression:\"!form.availableAllGroups\"}],staticClass:\"mt-2\"},_vm._l((_vm.groupProductOptions),function(family){return _c('div',{key:family.groupId,staticClass:\"pb-2 mb-2 border-bottom\"},[_c('h6',{staticClass:\"mb-0\"},[_c('b',[_vm._v(_vm._s(family.groupLabel))])]),_c('div',{staticClass:\"mb-2\"},[_c('small',[_c('b-link',{on:{\"click\":function($event){return _vm.selectGroup(true,family.options)}}},[_vm._v(\"Todos\")]),_vm._v(\" | \"),_c('b-link',{on:{\"click\":function($event){return _vm.selectGroup(false,family.options)}}},[_vm._v(\"Nenhum\")])],1)]),_vm._l((family.options),function(item){return _c('b-form-checkbox',{key:item.value,staticClass:\"ml-3\",attrs:{\"checked\":_vm.form.groupsProduct.find(function (a) { return a.groupProductId === item.value; }) != null},on:{\"change\":function($event){return _vm.addGroupSelected($event,item.value)}}},[_vm._v(\" \"+_vm._s(item.text)+\" \")])})],2)}),0)],1)]}}])})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('t-dialog-form',{ref:\"dialog_form\",attrs:{\"generalErrors\":_vm.generalErrors,\"title\":_vm.title,\"ok-text\":_vm.okText,\"id\":_vm.id,\"command\":_vm.command},on:{\"show\":_vm.showModal,\"hidden\":_vm.resetModal,\"onSubmit\":_vm.onSubmit}},[_c('t-input',{attrs:{\"add-error\":_vm.error.name,\"label\":\"Tipo de CaracterÃstica\",\"submitted\":\"\",\"focus\":\"\",\"required\":\"\"},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, \"name\", $$v)},expression:\"form.name\"}}),_c('t-input',{attrs:{\"label\":\"Observações\",\"max-length\":\"500\",\"textarea\":\"\"},model:{value:(_vm.form.note),callback:function ($$v) {_vm.$set(_vm.form, \"note\", $$v)},expression:\"form.note\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\n <t-dialog-form :generalErrors=\"generalErrors\" :title=\"title\" :ok-text=\"okText\" @show=\"showModal\" @hidden=\"resetModal\"\n :id=\"id\" :command=\"command\"\n ref=\"dialog_form\" @onSubmit=\"onSubmit\">\n\n <t-input v-model=\"form.name\" :add-error=\"error.name\" label=\"Tipo de CaracterÃstica\" submitted focus required/>\n\n\n <t-input v-model=\"form.note\" label=\"Observações\" max-length=\"500\" textarea/>\n\n\n </t-dialog-form>\n\n</template>\n<script>\nimport tDialogForm from \"@/components/template/dialog/t-dialog-form\";\nimport pageDialogFormMixin from \"@/mixins/page/pageDialogFormMixin\";\n\nexport default {\n name: \"TypeFeatureDialog\",\n components: {tDialogForm},\n mixins: [pageDialogFormMixin],\n data() {\n return {\n id: \"modal-type-feature\",\n title: \"Cadastro rápido de Tipo de CaracterÃstica\",\n okText: \"Incluir Tipo de CaracterÃstica\",\n form: {\n typeFeatureId: 0,\n name: \"\",\n note: \"\",\n status: 1,\n },\n error: {//Campos que podem receber retorno de erro do backend\n name: \"\",\n },\n }\n },\n methods: {\n\n //Declaro sempre localmente, pois poderá realizar operações diferentes do padrão como setar algum valor padrão vindo de fora e que seria limpo pelo resetModal de forma dinamica\n showModal() {\n\n //Limpa os campos\n this.resetModal()\n\n //Setar alguma informações padrão por exemplo vindo de fora\n\n },\n\n async onSubmit() {\n\n //Validações especÃficas da tela\n\n await this.setInsertDialog(\"product/type-feature\", (item) => {\n\n this.itemInserted.value = item.typeFeatureId\n this.itemInserted.text = this.form.name\n\n this.successInsert()\n\n })\n\n }\n },\n watch: {\n noOptionAdd() {\n this.form.name = this.noOptionAdd\n }\n }\n}\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TypeFeatureDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TypeFeatureDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TypeFeatureDialog.vue?vue&type=template&id=20bac170&\"\nimport script from \"./TypeFeatureDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./TypeFeatureDialog.vue?vue&type=script&lang=js&\"\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","<template>\n\n <t-page>\n\n <TypeFeatureDialog :no-option-add=\"noOptionAdd\" @onSubmit=\"onTypeFeatureDialog\"/>\n\n <t-page-form multi-cards :submit-text=\"currentPage.singularTitle\"\n :title=\"t('form-of')+currentPage.pageTitle\"\n :command=\"command\" :status=\"status\" :generalErrors=\"generalErrors\" @onSubmit=\"onSubmit\"\n :check-errors-again=\"checkErrorsComponent\"\n :go-back-title=\"t('go-back-list')\" :go-back-to=\"currentPage.name\" :busy=\"!pageFormIsLoaded\">\n\n\n <template #default=\"{status}\">\n\n <t-input v-model=\"form.featureId\" hidden/>\n\n <t-form-card title=\"Dados Básicos\">\n\n <t-input v-model=\"form.name\" :add-error=\"error.name\" label=\"Nome\" required/>\n\n <t-input v-model=\"form.typeFeatureId\"\n :options=\"typeFeatureOptions\"\n label=\"Tipo de CaracterÃstica\" select required>\n\n <template #no-options=\"{search}\">\n <b-link @click=\"addNoOption('modal-type-feature',search)\">Cadastrar Tipo</b-link>\n </template>\n\n <template #input-group-append>\n <t-button title=\"Adicionar novo tipo\" @click=\"openDialogForm('modal-type-feature')\"\n icon-plus/>\n </template>\n\n </t-input>\n\n <t-page-form-field-customized\n :command=\"command\" :status=\"status\" :user-auth=\"userAuth\"\n :fields-customizable=\"entityFieldCustomized('page')\"\n :primary-key=\"form.featureId\" :foreign-key=\"currentPage.pageId\" :busy=\"!pageFormIsLoaded\"\n :primary-key-column=\"fieldKey\" foreign-key-column=\"pageId\"\n />\n\n <t-input v-model=\"form.note\" label=\"Observações\" max-length=\"500\" textarea/>\n\n <t-input-status v-model=\"form.status\"/>\n\n </t-form-card>\n\n\n\n\n <t-form-card title=\"Grupos de produtos\" icon-folder>\n\n <b-form-checkbox class=\"col-sm-12 ml-2\" v-model=\"form.availableAllGroups\" switch>\n Disponibilizar esta caracterÃstica a todos os grupos de produtos?\n <t-help\n title=\"Você poderá especificar quais os produtos podem utilizar esta caracterÃstica, basta desmarcar esta opção e selecionar os grupos de produtos desejados.\"/>\n </b-form-checkbox>\n\n <div v-show=\"!form.availableAllGroups\" class=\"mt-2\">\n\n <div v-for=\"family in groupProductOptions\" :key=\"family.groupId\" class=\"pb-2 mb-2 border-bottom\">\n\n <h6 class=\"mb-0\"><b>{{ family.groupLabel }}</b></h6>\n\n <div class=\"mb-2\">\n <small>\n <b-link @click=\"selectGroup(true,family.options)\">Todos</b-link>\n |\n <b-link @click=\"selectGroup(false,family.options)\">Nenhum</b-link>\n </small>\n </div>\n\n <b-form-checkbox class=\"ml-3\" v-for=\"item in family.options\" :key=\"item.value\"\n :checked=\"form.groupsProduct.find(a => a.groupProductId === item.value) != null\"\n @change=\"addGroupSelected($event,item.value)\">\n {{ item.text }}\n </b-form-checkbox>\n\n </div>\n\n </div>\n\n </t-form-card>\n\n\n </template>\n\n\n </t-page-form>\n\n </t-page>\n\n</template>\n\n<script>\n\nimport TypeFeatureDialog from \"@/views/modules/product/TypeFeatureDialog\"\nimport pageDefaultMixin from \"@/mixins/page/pageDefaultMixin\"\nimport pageFormMixin from \"@/mixins/page/pageFormMixin\"\nimport groupProductService from \"@/services/modules/product/GroupProduct.service\";\nimport typeFeatureService from \"@/services/modules/product/TypeFeature.service\";\n\n\nimport ui from \"@/assets/scripts/ui\";\n\n\nexport default {\n mixins: [pageDefaultMixin, pageFormMixin],\n name: 'FeatureForm',\n components: {TypeFeatureDialog},\n data() {\n return {\n path: \"\", //Utilizar somente quando fora do padrão\n genKey: false, //Utilizar quando desejar gerar chave temporária\n enableGeneralFields:true,\n fieldKey: \"featureId\",\n form: {\n featureId: 0,\n typeFeatureId: 0,\n name: \"\",\n note: \"\",\n availableAllGroups: true,\n groupsProduct: [],\n status: 1\n },\n error: {//Campos que podem receber retorno de erro do backend\n name: \"\"\n },\n //--------------------------------------------------------------------------------------\n //InÃcio de campos personalizados desta tela\n noOptionAdd: \"\", //Usado para armazenar o começo do nome digitado para inserção rápida em dialogos na página.\n typeFeatureOptions: [],\n groupProductOptions: [],\n //--------------------------------------------------------------------------------------\n }\n },\n methods: {\n\n mountedPrepare() {\n\n },\n async mountedContinued() {\n\n await groupProductService.selectList(\"grouped\").then((list) => {\n this.groupProductOptions = list\n\n for (let group of this.groupProductOptions) {\n for (let item of group.options) {\n item.checked = false\n }\n }\n\n }).catch(error => this.responseError(error))\n\n\n await typeFeatureService.selectList().then((list) => {\n this.typeFeatureOptions = list\n }).catch(error => this.responseError(error))\n\n\n this.pageFormIsLoaded = true\n\n },\n async onSubmit() {\n\n\n if (!this.form.availableAllGroups && this.form.groupsProduct.length === 0) {\n ui.msgError(this, \"Você marcou a opção de especificar grupos para esta caracterÃstica, porém não selecionou nenhum grupo. Desmarque a opção ou selecione pelo menos 1(um) grupo antes de continuar.\")\n } else {\n await this.setSendingDefault()\n }\n\n\n },\n //--------------------------------------------------------------------------------------\n //InÃcio de métodos personalizados desta tela\n addGroupSelected(checked, id) {\n\n if (checked) {\n //Adicionar\n const el = this.form.groupsProduct.find(a => a.groupProductId === id)\n if (el == null)\n this.form.groupsProduct.push({groupProductId: id})\n } else {\n //Remover\n const indexRemove = this.form.groupsProduct.findIndex(a => a.groupProductId === id)\n\n if (indexRemove >= 0)\n this.form.groupsProduct.splice(indexRemove, 1)\n\n }\n\n },\n\n selectGroup(checked, array) {\n\n for (const el of array) {\n this.addGroupSelected(checked, el.value)\n }\n\n },\n\n onTypeFeatureDialog(itemInserted) {\n\n this.form.typeFeatureId = itemInserted.value\n this.typeFeatureOptions.push(itemInserted); //Simples, pois é uma lista não agrupada\n\n },\n\n //--------------------------------------------------------------------------------------\n\n },\n async mounted() {\n\n this.mountedPrepare()\n\n await this.mountedForm(true, false)\n\n await this.mountedContinued()\n\n },\n\n}\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FeatureForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FeatureForm.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FeatureForm.vue?vue&type=template&id=a00c55ba&\"\nimport script from \"./FeatureForm.vue?vue&type=script&lang=js&\"\nexport * from \"./FeatureForm.vue?vue&type=script&lang=js&\"\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","import http from '../../config/http-common';\r\n\r\n//Usado somente se for realmente necessário algo fora do padrão GeneralCRUD.service.js\r\nconst path = \"product/type-feature\"\r\n\r\nclass service {\r\n\r\n selectList(params) {\r\n return http.list(path + \"/selectList\",params);\r\n }\r\n\r\n\r\n}\r\n\r\nexport default new service();\r\n\r\n"],"sourceRoot":""}